[issue11049] add tests for test.support

Antoine Pitrou report at bugs.python.org
Sat Jan 29 13:45:54 CET 2011

Antoine Pitrou <pitrou at free.fr> added the comment:

+        os.mkdir(os.path.join(TESTFN, TESTFN))

Please don't. This will break the day TESTFN becomes a non-trivial path.

+    def test_make_bad_fd(self):
+        fd = support.make_bad_fd()
+        self.assertRaises(OSError, os.write, fd, b"foo")

You should also check that the errno is EBADF.

nosy: +pitrou

Python tracker <report at bugs.python.org>

More information about the Python-bugs-list mailing list