Branch merge

This commit is contained in:
Éric Araujo 2012-02-17 18:10:11 +01:00
commit f1fd388c77
2 changed files with 6 additions and 1 deletions

View file

@ -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

View file

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