diff options
author | Ramiro Morales <ramiro@rmorales.net> | 2013-10-23 07:59:06 -0300 |
---|---|---|
committer | Ramiro Morales <ramiro@rmorales.net> | 2013-10-23 09:27:18 -0300 |
commit | 7f5555db2b2c711a2ba66ee586d145d70e1a7609 (patch) | |
tree | 73f3eb61ee4c8036950874a51639ac085a544d96 | |
parent | 27f3f341369c8e18ea4a360a1f7c01531836b68b (diff) | |
download | django-7f5555db2b2c711a2ba66ee586d145d70e1a7609.tar.gz |
[1.6.x] Workaround admin scripts test failures on Windows+Python 3.
Change strategy used to examine instrumented output to acommodate the
fact that on Windows, where the path separator is '\', repr() of Python
modules has changed in Python 3 to use escaped backslashes in the FS
path section (e.g.
'C:\\python3x\\Lib\\site-packages\\django\\contrib\\auth\\models.py')
without having to special-case based on platform.
c04f3fc686 from master.
-rw-r--r-- | tests/admin_scripts/tests.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/admin_scripts/tests.py b/tests/admin_scripts/tests.py index 9a6cf06a60..56cd8e160e 100644 --- a/tests/admin_scripts/tests.py +++ b/tests/admin_scripts/tests.py @@ -1385,7 +1385,7 @@ class CommandTypes(AdminScriptTestCase): out, err = self.run_manage(args) self.assertNoOutput(err) self.assertOutput(out, "EXECUTE:AppCommand app=<module 'django.contrib.auth.models'") - self.assertOutput(out, os.sep.join(['django', 'contrib', 'auth', 'models.py'])) + self.assertOutput(out, "module 'django.contrib.auth.models' from") self.assertOutput(out, str_prefix("'>, options=[('pythonpath', None), ('settings', None), ('traceback', None), ('verbosity', %(_)s'1')]")) def test_app_command_no_apps(self): @@ -1400,10 +1400,10 @@ class CommandTypes(AdminScriptTestCase): out, err = self.run_manage(args) self.assertNoOutput(err) self.assertOutput(out, "EXECUTE:AppCommand app=<module 'django.contrib.auth.models'") - self.assertOutput(out, os.sep.join(['django', 'contrib', 'auth', 'models.py'])) + self.assertOutput(out, "module 'django.contrib.auth.models' from") self.assertOutput(out, str_prefix("'>, options=[('pythonpath', None), ('settings', None), ('traceback', None), ('verbosity', %(_)s'1')]")) self.assertOutput(out, "EXECUTE:AppCommand app=<module 'django.contrib.contenttypes.models'") - self.assertOutput(out, os.sep.join(['django', 'contrib', 'contenttypes', 'models.py'])) + self.assertOutput(out, "module 'django.contrib.contenttypes.models' from") self.assertOutput(out, str_prefix("'>, options=[('pythonpath', None), ('settings', None), ('traceback', None), ('verbosity', %(_)s'1')]")) def test_app_command_invalid_appname(self): |