Skip to content

Commit c2e2245

Browse files
Bolotnyjpicnixz
andauthored
Apply suggestion from @picnixz
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
1 parent c68621b commit c2e2245

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

‎Lib/test/test_filecmp.py‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -392,8 +392,7 @@ def _assert_report(self, dircmp_report, expected_report_lines):
392392
class DirCmpImplementationTests(unittest.TestCase):
393393
def setUp(self):
394394
cm = os_helper.temp_dir()
395-
tmpdir = cm.__enter__()
396-
self.addCleanup(cm.__exit__, None, None, None)
395+
tmpdir = self.enterContext(os_helper.temp_dir())
397396

398397
self.base_test_dir = os.path.join(tmpdir, 'test_filecmp_working_dir')
399398
os.makedirs(self.base_test_dir, exist_ok=True)

0 commit comments

Comments
 (0)