Skip to content

Commit

Permalink
Add note and test for GetEnvironmentStrings() fix in #1661
Browse files Browse the repository at this point in the history
  • Loading branch information
mhammond committed Mar 27, 2021
1 parent 969c130 commit d9fb5fb
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGES.txt
Expand Up @@ -8,6 +8,9 @@ Note that build 228 was the last version supporting Python 2.

Since build 300:
----------------
* Fix a bug in `win32profile.GetEnvironmentStrings()` relating to environment
variables with an equals sign (@maxim-krikun in #1661)

* Added win32com.shell.SHGetKnownFolderPath() and related constants.

* Shifted work in win32.lib.pywin32_bootstrap to Python's import system from
Expand Down
15 changes: 15 additions & 0 deletions win32/test/test_win32profile.py
@@ -0,0 +1,15 @@
"""Test win32profile"""
import os
import unittest
import win32profile

class Tester(unittest.TestCase):
def test_environment(self):
os.environ["FOO"] = "bar=baz"
env = win32profile.GetEnvironmentStrings()
assert "FOO" in env
assert env["FOO"] == "bar=baz"
assert os.environ["FOO"] == "bar=baz"

if __name__ == '__main__':
unittest.main()

0 comments on commit d9fb5fb

Please sign in to comment.