def METHOD_NAME(self):
    with self.assertRaises(ValueError):
        fcntl.fcntl(-1, fcntl.F_SETFL, os.O_NONBLOCK)
    with self.assertRaises(ValueError):
        fcntl.fcntl(BadFile(-1), fcntl.F_SETFL, os.O_NONBLOCK)
    with self.assertRaises(TypeError):
        fcntl.fcntl('spam', fcntl.F_SETFL, os.O_NONBLOCK)
    with self.assertRaises(TypeError):
        fcntl.fcntl(BadFile('spam'), fcntl.F_SETFL, os.O_NONBLOCK)