oppia: Unable to run backend tests
I used this command to run a backend test
python -m scripts.run_backend_tests --test_target=scripts.linters.general_purpose_linter_test
ERROR LOG
Error 1
Traceback (most recent call last):
File "/home/nishantwrp/Desktop/dev/open-source/oppia/core/tests/gae_suite.py", line 113, in <module>
main()
File "/home/nishantwrp/Desktop/dev/open-source/oppia/core/tests/gae_suite.py", line 100, in main
suites = create_test_suites(test_target=parsed_args.test_target)
File "/home/nishantwrp/Desktop/dev/open-source/oppia/core/tests/gae_suite.py", line 83, in create_test_suites
if test_target else [loader.discover(
File "/usr/lib/python2.7/unittest/loader.py", line 100, in loadTestsFromName
parent, obj = obj, getattr(obj, part)
AttributeError: 'module' object has no attribute 'general_purpose_linter_test'
11:23:08 ERROR scripts.linters.general_purpose_linter_test: 9.6 secs
Error 1
Traceback (most recent call last):
File "/home/nishantwrp/Desktop/dev/open-source/oppia/core/tests/gae_suite.py", line 113, in <module>
main()
File "/home/nishantwrp/Desktop/dev/open-source/oppia/core/tests/gae_suite.py", line 100, in main
suites = create_test_suites(test_target=parsed_args.test_target)
File "/home/nishantwrp/Desktop/dev/open-source/oppia/core/tests/gae_suite.py", line 83, in create_test_suites
if test_target else [loader.discover(
File "/usr/lib/python2.7/unittest/loader.py", line 100, in loadTestsFromName
parent, obj = obj, getattr(obj, part)
AttributeError: 'module' object has no attribute 'general_purpose_linter_test'
+------------------+
| SUMMARY OF TESTS |
+------------------+
= create_test_suites(test_target=parsed_args.test_target)
File "/home/nishantwrp/Desktop/dev/open
------------------------------------------------------
WARNING: FAILED TO RUN scripts.linters.general_purpose_linter_test
This is most likely due to an import error.
------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/home/nishantwrp/Desktop/dev/open-source/oppia/scripts/run_backend_tests.py", line 441, in <module>
main()
File "/home/nishantwrp/Desktop/dev/open-source/oppia/scripts/run_backend_tests.py", line 402, in main
raise Exception('WARNING: No tests were run.')
Exception: WARNING: No tests were run.
@srijanreddy98 was also facing this issue.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 27 (26 by maintainers)
@seanlip Is there an update on the status of this issue, can we still reproduce this error? I think the solution is to install
configparseras mentioned by @nishantwrp above or by @nithusha21 here in #10852? Was any script modified in our codebase to fix it ? We can mention it here and possibly close the issue.(Landed up here because I was going through issues affecting the linter)