diff options
| -rw-r--r-- | Lib/packaging/tests/support.py | 2 | ||||
| -rw-r--r-- | Lib/packaging/tests/test_util.py | 5 | 
2 files changed, 6 insertions, 1 deletions
| diff --git a/Lib/packaging/tests/support.py b/Lib/packaging/tests/support.py index 06f06c994c..d76d3dbdee 100644 --- a/Lib/packaging/tests/support.py +++ b/Lib/packaging/tests/support.py @@ -342,7 +342,7 @@ def _get_xxmodule_path():          srcdir = sysconfig.get_config_var('projectbase')          path = os.path.join(os.getcwd(), srcdir, 'Modules', 'xxmodule.c')      else: -        os.path.join(os.path.dirname(__file__), 'xxmodule.c') +        path = os.path.join(os.path.dirname(__file__), 'xxmodule.c')      if os.path.exists(path):          return path diff --git a/Lib/packaging/tests/test_util.py b/Lib/packaging/tests/test_util.py index 737503ebf6..7f7ed18683 100644 --- a/Lib/packaging/tests/test_util.py +++ b/Lib/packaging/tests/test_util.py @@ -173,6 +173,11 @@ class UtilTestCase(support.EnvironRestorer,          sys.stdout = self.old_stdout          sys.stderr = self.old_stderr +    def test_set_platform(self): +        self.addCleanup(util.set_platform, util.get_platform()) +        util.set_platform("fake") +        self.assertEqual("fake", util.get_platform()) +      def test_convert_path(self):          # linux/mac          os.sep = '/' | 
