We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4005472 commit 66ebfc9Copy full SHA for 66ebfc9
1 file changed
Lib/test/test_site.py
@@ -207,14 +207,11 @@ def test_addsitedir_idempotent(self):
207
pth_file = PthFile()
208
pth_file.cleanup(prep=True)
209
210
- try:
211
- pth_file.create()
+ with pth_file.create():
212
dirs = set()
213
dirs = site.addsitedir(pth_file.base_dir, dirs)
214
215
self.pth_file_tests(pth_file)
216
- finally:
217
- pth_file.cleanup()
218
219
def test_addsitedir_dotfile(self):
220
pth_file = PthFile('.dotfile')
0 commit comments