mirror of
https://github.com/python/cpython.git
synced 2025-09-27 02:39:58 +00:00
Branch merge
This commit is contained in:
commit
f1fd388c77
2 changed files with 6 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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 = '/'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue