mirror of
https://github.com/python/cpython.git
synced 2025-09-27 10:50:04 +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')
|
srcdir = sysconfig.get_config_var('projectbase')
|
||||||
path = os.path.join(os.getcwd(), srcdir, 'Modules', 'xxmodule.c')
|
path = os.path.join(os.getcwd(), srcdir, 'Modules', 'xxmodule.c')
|
||||||
else:
|
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):
|
if os.path.exists(path):
|
||||||
return path
|
return path
|
||||||
|
|
||||||
|
|
|
@ -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