10000 bpo-36144: Update os.environ and os.environb for PEP 584 by chaburkland · Pull Request #18911 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-36144: Update os.environ and os.environb for PEP 584 #18911

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Mar 13, 2020
Prev Previous commit
Next Next commit
Makes the type/purpose of 'expected' more explicit.
  • Loading branch information
chaburkland committed Mar 12, 2020
commit 571a329ad48850e6f717c33471e53b2840dba716
6 changes: 3 additions & 3 deletions Lib/test/test_os.py
Original file line number Diff line number Diff line change
Expand Up @@ -1031,7 +1031,7 @@ def test_or_operator(self):
os.environ[overridden_key] = 'original_value'

new_vars_dict = {'_A_': '1', '_B_': '2', overridden_key: '3'}
expected = os.environ.copy()
expected = dict(os.environ)
expected.update(new_vars_dict)

actual = os.environ | new_vars_dict
Expand All @@ -1046,7 +1046,7 @@ def test_ior_operator(self):
os.environ[overridden_key] = 'original_value'

new_vars_dict = {'_A_': '1', '_B_': '2', overridden_key: '3'}
expected = os.environ.copy()
expected = dict(os.environ)
expected.update(new_vars_dict)

os.environ |= new_vars_dict
Expand All @@ -1071,7 +1071,7 @@ def test_ior_operator_key_value_iterable(self):
os.environ[overridden_key] = 'original_value'

new_vars_items = (('_A_', '1'), ('_B_', '2'), (overridden_key, '3'))
expected = os.environ.copy()
expected = dict(os.environ)
expected.update(new_vars_items)

os.environ |= new_vars_items
Expand Down
0