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.
This commit is contained in:
parent
ae48d77ef8
commit
aefc1d4e65
|
@ -1409,7 +1409,7 @@ class CommandTypes(AdminScriptTestCase):
|
||||||
out, err = self.run_manage(args)
|
out, err = self.run_manage(args)
|
||||||
self.assertNoOutput(err)
|
self.assertNoOutput(err)
|
||||||
self.assertOutput(out, "EXECUTE:AppCommand app=<module 'django.contrib.auth.models'")
|
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=[('no_color', False), ('pythonpath', None), ('settings', None), ('traceback', None), ('verbosity', %(_)s'1')]"))
|
self.assertOutput(out, str_prefix("'>, options=[('no_color', False), ('pythonpath', None), ('settings', None), ('traceback', None), ('verbosity', %(_)s'1')]"))
|
||||||
|
|
||||||
def test_app_command_no_apps(self):
|
def test_app_command_no_apps(self):
|
||||||
|
@ -1424,10 +1424,10 @@ class CommandTypes(AdminScriptTestCase):
|
||||||
out, err = self.run_manage(args)
|
out, err = self.run_manage(args)
|
||||||
self.assertNoOutput(err)
|
self.assertNoOutput(err)
|
||||||
self.assertOutput(out, "EXECUTE:AppCommand app=<module 'django.contrib.auth.models'")
|
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=[('no_color', False), ('pythonpath', None), ('settings', None), ('traceback', None), ('verbosity', %(_)s'1')]"))
|
self.assertOutput(out, str_prefix("'>, options=[('no_color', False), ('pythonpath', None), ('settings', None), ('traceback', None), ('verbosity', %(_)s'1')]"))
|
||||||
self.assertOutput(out, "EXECUTE:AppCommand app=<module 'django.contrib.contenttypes.models'")
|
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=[('no_color', False), ('pythonpath', None), ('settings', None), ('traceback', None), ('verbosity', %(_)s'1')]"))
|
self.assertOutput(out, str_prefix("'>, options=[('no_color', False), ('pythonpath', None), ('settings', None), ('traceback', None), ('verbosity', %(_)s'1')]"))
|
||||||
|
|
||||||
def test_app_command_invalid_appname(self):
|
def test_app_command_invalid_appname(self):
|
||||||
|
|
Loading…
Reference in New Issue