question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to run backend tests

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:27 (26 by maintainers)

github_iconTop GitHub Comments

1reaction
sajalasaticommented, Apr 1, 2021

@seanlip Is there an update on the status of this issue, can we still reproduce this error? I think the solution is to install configparser as 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)

0reactions
seanlipcommented, Jul 3, 2021

Hi @anandwana001, could you please check with @DubeySandeep about this? He should be able to help you.

Does running the backend tests on a clean develop branch work?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Xamarin.UITest Unable to contact test backend running in app
Exception : Unable to contact test backend running in app. A common cause is that the app is not properly linked with Calabash....
Read more >
Unable to contact test backend running in app. A common ...
SetUp : System.Exception : Unable to contact test backend running in app. A common cause is that the app is not properly linked...
Read more >
“Unable to contact test backend running in app” when trying to ...
I simply want to run a test locally on my machine. In trying to fix this, I've uninstalled the Xamarin Test Cloud Agent...
Read more >
Foresight Blog | How to Fix Your Failing End-to-End Tests?
There are multiple reasons a test fails. It could be related to the actual application code your tests try to validate, or to...
Read more >
Debugging Failing Tests and Test Pipelines - GitLab
Use the environment variable QA_LOG_LEVEL=debug to enable additional logging output that includes page actions and Git commands. Additional information about ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found