Skip to content
Prev Previous commit
Next Next commit
Fix test
  • Loading branch information
kj7rrv committed Jul 7, 2022
commit ff507d9002bb0689ea2e3cfbc80976a49b7a1f96
13 changes: 8 additions & 5 deletions Lib/test/test_tempfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -848,11 +848,14 @@ def test_for_tempdir_is_bytes_issue40701_api_warts(self):
finally:
tempfile.tempdir = orig_tempdir

def test_absolute_path(self):
"""Test that the path returned is absolute"""
path = tempfile.mkdtemp(dir=".")
self.assertEqual(os.path.isabs(path), True)
os.rmdir(path)
def test_path_is_absolute(self):
# Test that the path returned by mkdtemp with a relative `dir`
# argument is absolute
try:
path = tempfile.mkdtemp(dir=".")
self.assertTrue(os.path.isabs(path))
finally:
os.rmdir(path)


class TestMktemp(BaseTestCase):
Expand Down