aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_getopt.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_getopt.py')
-rw-r--r--Lib/test/test_getopt.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/test/test_getopt.py b/Lib/test/test_getopt.py
index ed967ad2761..8d0d5084abb 100644
--- a/Lib/test/test_getopt.py
+++ b/Lib/test/test_getopt.py
@@ -13,8 +13,7 @@ sentinel = object()
class GetoptTests(unittest.TestCase):
def setUp(self):
self.env = self.enterContext(EnvironmentVarGuard())
- if "POSIXLY_CORRECT" in self.env:
- del self.env["POSIXLY_CORRECT"]
+ del self.env["POSIXLY_CORRECT"]
def assertError(self, *args, **kwargs):
self.assertRaises(getopt.GetoptError, *args, **kwargs)