mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Add test for packaging.util.set_platform (#13974).
Patch by Tshepang Lekhonkhobe.
This commit is contained in:
parent
4aec77617f
commit
e8c5fdba30
1 changed files with 5 additions and 0 deletions
|
@ -173,6 +173,11 @@ class UtilTestCase(support.EnvironRestorer,
|
||||||
sys.stdout = self.old_stdout
|
sys.stdout = self.old_stdout
|
||||||
sys.stderr = self.old_stderr
|
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):
|
def test_convert_path(self):
|
||||||
# linux/mac
|
# linux/mac
|
||||||
os.sep = '/'
|
os.sep = '/'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue