def test_fileobject_close(self): """verify we can construct fileobjects w/ the close kw arg""" fd = _socket._fileobject(None, close=True) self.assertEqual(fd.mode, 'rb') self.assertEqual(fd.closed, True)