diff options
| author | Victor Stinner <vstinner@python.org> | 2020-01-24 14:05:48 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-01-24 14:05:48 +0100 |
| commit | b8d1262e8afe7b907b4a394a191739571092acdb (patch) | |
| tree | 32ad60fdd1ee4b039233a25a0663f022f97b0e77 /Lib/test/test_os.py | |
| parent | 161e7b36b1ea871a1352ccfc1d4f4c1eda76830f (diff) | |
| download | cpython-git-b8d1262e8afe7b907b4a394a191739571092acdb.tar.gz | |
bpo-39395: putenv() and unsetenv() always available (GH-18135)
The os.putenv() and os.unsetenv() functions are now always available.
On non-Windows platforms, Python now requires setenv() and unsetenv()
functions to build.
Remove putenv_dict from posixmodule.c: it's not longer needed.
Diffstat (limited to 'Lib/test/test_os.py')
| -rw-r--r-- | Lib/test/test_os.py | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py index dbdc00c2fe..9e3a1695df 100644 --- a/Lib/test/test_os.py +++ b/Lib/test/test_os.py @@ -953,8 +953,6 @@ class EnvironTests(mapping_tests.BasicTestMappingProtocol): value_str = value.decode(sys.getfilesystemencoding(), 'surrogateescape') self.assertEqual(os.environ['bytes'], value_str) - @unittest.skipUnless(hasattr(os, 'putenv'), "Test needs os.putenv()") - @unittest.skipUnless(hasattr(os, 'unsetenv'), "Test needs os.unsetenv()") def test_putenv_unsetenv(self): name = "PYTHONTESTVAR" value = "testvalue" @@ -975,8 +973,6 @@ class EnvironTests(mapping_tests.BasicTestMappingProtocol): # On OS X < 10.6, unsetenv() doesn't return a value (bpo-13415). @support.requires_mac_ver(10, 6) - @unittest.skipUnless(hasattr(os, 'putenv'), "Test needs os.putenv()") - @unittest.skipUnless(hasattr(os, 'unsetenv'), "Test needs os.unsetenv()") def test_putenv_unsetenv_error(self): # Empty variable name is invalid. # "=" and null character are not allowed in a variable name. |
