Skip to content

Commit e6c0d1f

Browse files
committed
testing: remove deprecated mktemp fallback in py.path.local tests
It's deprecated in typeshed, the fallback is probably not needed these days.
1 parent adb3658 commit e6c0d1f

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

testing/_py/test_local.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -734,12 +734,8 @@ def test_dump(self, tmpdir, bin):
734734
def test_setmtime(self):
735735
import tempfile
736736

737-
try:
738-
fd, name = tempfile.mkstemp()
739-
os.close(fd)
740-
except AttributeError:
741-
name = tempfile.mktemp()
742-
open(name, "w").close()
737+
fd, name = tempfile.mkstemp()
738+
os.close(fd)
743739
try:
744740
# Do not use _pytest.timing here, as we do not want time mocking to affect this test.
745741
mtime = int(time.time()) - 100

0 commit comments

Comments
 (0)