mirror of
https://github.com/RustPython/RustPython.git
synced 2026-06-02 19:39:49 +09:00
Merge pull request #4752 from jinnarajin/updategetoff
update test_getopt.py from cpython 3.11.2
This commit is contained in:
6
Lib/test/test_getopt.py
vendored
6
Lib/test/test_getopt.py
vendored
@@ -11,14 +11,10 @@ sentinel = object()
|
||||
|
||||
class GetoptTests(unittest.TestCase):
|
||||
def setUp(self):
|
||||
self.env = EnvironmentVarGuard()
|
||||
self.env = self.enterContext(EnvironmentVarGuard())
|
||||
if "POSIXLY_CORRECT" in self.env:
|
||||
del self.env["POSIXLY_CORRECT"]
|
||||
|
||||
def tearDown(self):
|
||||
self.env.__exit__()
|
||||
del self.env
|
||||
|
||||
def assertError(self, *args, **kwargs):
|
||||
self.assertRaises(getopt.GetoptError, *args, **kwargs)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user