Index: Lib/test/test_ntpath.py =================================================================== --- Lib/test/test_ntpath.py (revision 78596) +++ Lib/test/test_ntpath.py (working copy) @@ -178,6 +178,16 @@ for upath in (u'', u'fuu', u'f\xf9\xf9', u'/fuu', u'U:\\'): self.assertIsInstance(ntpath.abspath(upath), unicode) + def test_abspath_on_devnull(self): + r""" + abspath(devnull) incorrectly returns '\\\\nul' + See bugs.python.org/issue7909 + """ + absolute_devnull = ntpath.abspath(os.devnull) + try: + open(absolute_devnull) + except IOError: + self.fail("IOError occurred opening absolute reference to NUL, which was %s" % absolute_devnull) def test_relpath(self): currentdir = os.path.split(os.getcwd())[-1]