Skip to content

Commit 5c2ba31

Browse files
committed
remove redundant condition
1 parent 5b7934a commit 5c2ba31

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

Lib/test/test_builtin.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1572,8 +1572,7 @@ def test_open_default_encoding(self):
15721572
# locale encoding to check that open() uses the current locale
15731573
# encoding and not the user preferred encoding
15741574
for key in ('LC_ALL', 'LANG', 'LC_CTYPE'):
1575-
if key in env:
1576-
del env[key]
1575+
del env[key]
15771576

15781577
self.write_testfile()
15791578
current_locale_encoding = locale.getencoding()

Lib/test/test_io.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2897,8 +2897,7 @@ def test_default_encoding(self):
28972897
# locale encoding to check that TextIOWrapper() uses the current
28982898
# locale encoding and not the user preferred encoding
28992899
for key in ('LC_ALL', 'LANG', 'LC_CTYPE'):
2900-
if key in env:
2901-
del env[key]
2900+
del env[key]
29022901

29032902
current_locale_encoding = locale.getencoding()
29042903
b = self.BytesIO()

0 commit comments

Comments
 (0)