I modified a test and introduced a syntax error. I then called the test using a class-specific path like python -m green my_program.test.test_1 -vv, where the output was:
Ran 0 tests in 4.376s
No Tests Found
But then if I change how I run it like python -m green my_program then I see the Traceback with the SyntaxError:
Traceback (most recent call last):
File "c:\Program Files\Python35\lib\runpy.py", line 170, in _run_module_as_main
"__main__", mod_spec)
File "c:\Program Files\Python35\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "c:\Program Files\Python35\lib\site-packages\green\__main__.py", line 7, in <module>
sys.exit(main())
File "c:\Program Files\Python35\lib\site-packages\green\cmdline.py", line 75, in main
result = run(test_suite, stream, args, testing)
File "c:\Program Files\Python35\lib\site-packages\green\runner.py", line 92, in run
targets = [(target, manager.Queue()) for target in toParallelTargets(suite, args.targets)]
File "c:\Program Files\Python35\lib\site-packages\green\loader.py", line 60, in toParallelTargets
proto_test_list = toProtoTestList(suite)
File "c:\Program Files\Python35\lib\site-packages\green\loader.py", line 45, in toProtoTestList
toProtoTestList(i, test_list, doing_completions)
File "c:\Program Files\Python35\lib\site-packages\green\loader.py", line 45, in toProtoTestList
toProtoTestList(i, test_list, doing_completions)
File "c:\Program Files\Python35\lib\site-packages\green\loader.py", line 45, in toProtoTestList
toProtoTestList(i, test_list, doing_completions)
File "c:\Program Files\Python35\lib\site-packages\green\loader.py", line 45, in toProtoTestList
toProtoTestList(i, test_list, doing_completions)
File "c:\Program Files\Python35\lib\site-packages\green\loader.py", line 37, in toProtoTestList
getattr(suite, exception_method)()
File "c:\Program Files\Python35\lib\site-packages\green\loader.py", line 235, in testFailure
raise ImportError(message)
ImportError: Failed to import pixtitch.test.test_indices computed from filename my_program\test\test_1.py
Traceback (most recent call last):
File "c:\Program Files\Python35\lib\site-packages\green\loader.py", line 212, in loadFromModuleFilename
__import__(dotted_module)
File "my_program\test\test_1.py", line 113
red[:] = [500, 0, 500 0]
^
SyntaxError: invalid syntax
I modified a test and introduced a syntax error. I then called the test using a class-specific path like
python -m green my_program.test.test_1 -vv
, where the output was:But then if I change how I run it like
python -m green my_program
then I see the Traceback with the SyntaxError: