From e8c5fdba30dd391ba885063b62949f5bd356544b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Thu, 16 Feb 2012 19:32:17 +0100 Subject: [PATCH] Add test for packaging.util.set_platform (#13974). Patch by Tshepang Lekhonkhobe. --- Lib/packaging/tests/test_util.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Lib/packaging/tests/test_util.py b/Lib/packaging/tests/test_util.py index 737503ebf66..7f7ed186837 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 = '/'