From: Éric Araujo <merwok@netwok.org>
Date: Thu, 16 Feb 2012 18:32:17 +0000 (+0100)
Subject: Add test for packaging.util.set_platform (#13974).
X-Git-Tag: v3.3.0a1~153^2~1
X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e8c5fdba30dd391ba885063b62949f5bd356544b;p=python

Add test for packaging.util.set_platform (#13974).

Patch by Tshepang Lekhonkhobe.
---

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 = '/'