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.

./runtests.sh does not pick up on missing imports

See original GitHub issue

Describe the bug As can be seen here: https://github.com/Project-MONAI/MONAI/runs/4802838071, the .runtests.sh passes (the job named flake8), yet the tests fail, due to missing imports: https://github.com/Project-MONAI/MONAI/runs/4802838468?check_suite_focus=true#step:10:11980.

Expected behavior Our runtests.sh script should pick up on these.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
wylicommented, Jan 13, 2022

Yes, I found the same issue a while ago https://github.com/Project-MONAI/MONAI/pull/3462 but didn’t look into the root cause. now I know it’s not detected because of ignoring F821 https://github.com/Project-MONAI/MONAI/blob/b9ef673faa990ae47b8b6656fff17a84c76fbf3e/setup.cfg#L108

#3659 addresses it, and it’s also good to have the pylint checks, thanks!

0reactions
rijobrocommented, Jan 14, 2022

Great, good hunting!

Read more comments on GitHub >

github_iconTop Results From Across the Web

pytest cannot import module while python can - Stack Overflow
Found the answer: DO NOT put a __init__.py file in a folder containing TESTS if you plan on using pytest. I had one...
Read more >
Implement code action for missing imports · Issue #19 - GitHub
Missing imports feature indexes libraries trying to determine where particular symbol is coming from. Indexing is not analysis, it is basically just parsing....
Read more >
Code coverage testing - Visual Studio (Windows)
If you merge a results file that has been exported and then imported, you can only view the results by lines, not by...
Read more >
Configuring Jest
Node.js core modules, like fs , are not mocked by default. ... This will collect coverage information for all the files inside the...
Read more >
How to use unittest-based tests with pytest
pytest will automatically collect unittest.TestCase subclasses and their test methods in test_*.py or *_test.py files. Almost all unittest features are ...
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