Ticket #2490: runtests.diff
File runtests.diff, 778 bytes (added by , 18 years ago) |
---|
-
runtests.py
288 288 verbosity_level = 0 289 289 if options.v: 290 290 verbosity_level = int(options.v) 291 291 292 if options.settings: 292 293 os.environ['DJANGO_SETTINGS_MODULE'] = options.settings 294 elif not os.environ.has_key('DJANGO_SETTINGS_MODULE'): 295 try: 296 import settings 297 os.environ['DJANGO_SETTINGS_MODULE'] = 'settings' 298 except ImportError: 299 parser.print_help() 300 print "\nERROR: No settings file found. Please use --settings=some_setting_file" 301 sys.exit(-1) 302 293 303 t = TestRunner(verbosity_level, args) 294 304 t.run_tests()