New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add missing skips #2861
Comments
What does skip test exactly mean?
Is it okay for me to be assigned to this issue? |
After further investigation I noticed that there exists a dependency check already in place. The problem is caused by the imports (happening at bear declaration time) taking place before the actual dependency check. I thought of 2 possible solutions:
After
Nevertheless this issues seems like it needs discussing. |
@Daronion , see other test classes in the bears repo, and you should see a skip decorator used on them. The log of errors probably contains quite a few different sorts of problems, so focus on MementoBear, PEP8NotebookBear, PySafetyBear, PyromaBear, EradicateBear, and others which have the same type of problem as those ones. We'll move the clang and giturlparse ones to a new issue. |
@jayvdb , I looked at other classes and found the generate_skip_decorator. I focused on MementoBear and noticed the following: I tried adding the skip decorator on each test with the URLBear as argument, since I knew its REQUIREMENTS were not met, which meant all 3 tests should have been skipped. However i still get the same error. I think the problem remains the same. For the errors to show up it means the tests don't reach the skip decorator part at all. The errors take place right at the beginning of the test, when the import happens. URLHeadBear and MementoBear are being imported with no check of their requirements taking place. This means we need to import the bears in the test files after a dependency check which brings me back to my previews post. |
You need to ignore any test file where the failing import appears in the test suite. The analysis that you are doing is useful, and you appear to be going in the right direction, but there are two types of import errors and you need to keep going until you understand them both. Keeping looking through the list of errors, especially for PEP8NotebookBear, PySafetyBear, PyromaBear, EradicateBear which I mentioned earlier. |
I checked on each of the bears mentioned (I couldn't find the EradicateBear though, maybe you mean the eradicate module from PyCommentedCodeBear).
At the beginning of this test , without any dependency checks the PEP8NotebookBear is imported and in the PEP8NotebookBear we are importing nbformat which doesn't exist. The same goes for all of the other bears, as their tests import them in the beginning of their files after which they import files that might not exist leading to errors. From what I see the problem is the same. It seems to me as if there is a single type of import error taking place every time so if you could help me figure out what the second type of import error is that would be great. Also I think I have an idea of how to fix the current import error that occurs on every bear test. From:
To:
If the problem is a different one please explain it to me since I don't see any different types of import errors taking place other than the one described above. |
Tests should skip if dependencies are missing. Currently all python deps are pre-installed, but
The text was updated successfully, but these errors were encountered: