Skip to content

Commit 42ee90b

Browse files
authored
Merge pull request RustPython#4752 from jinnarajin/updategetoff
update test_getopt.py from cpython 3.11.2
2 parents f5d2b86 + 0772f6f commit 42ee90b

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

Lib/test/test_getopt.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,10 @@
1111

1212
class GetoptTests(unittest.TestCase):
1313
def setUp(self):
14-
self.env = EnvironmentVarGuard()
14+
self.env = self.enterContext(EnvironmentVarGuard())
1515
if "POSIXLY_CORRECT" in self.env:
1616
del self.env["POSIXLY_CORRECT"]
1717

18-
def tearDown(self):
19-
self.env.__exit__()
20-
del self.env
21-
2218
def assertError(self, *args, **kwargs):
2319
self.assertRaises(getopt.GetoptError, *args, **kwargs)
2420

0 commit comments

Comments
 (0)