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
Functional and unit tests can not be run at the same time due to side effects #52
Comments
The right way to run tests is through: unit tests
functional tests
integration tests (with django)
|
In an ideal world, all tests would be runnable at once. Is there a specific reason that the functional tests should have a side effect that cause issues with the unit tests? |
unit tests are unwired and test stuff in a much steady, they also are many times faster than the functional ones. functional tests depends on filesystem, operational system (e.g. stdout validation) and so on, which make them a bit slower. integration tests, do test lettuce with different django projects, with different structure, and are the slower ones. there is also the "acceptance" tests, which validates code within documentation (sphinx), but I don't really care for them so far. Actually, in a ideal world, my tests are ran separately, so that I cat get feedback faster, as the test cases and suites grows and take even more time to run. |
I took this afternoon to dig through this code and figure it out. It was a globals issue where the registry was being setup in anticipation of a test inside I've patched it by explicitly setting up the environment that's expected inside the This doesn't effect the other way of running code and definitely takes longer (~7.5 seconds on my machine) to run the whole thing, but it corrects the issue of a false-failure when the entire test suite is run at once. You can see the changes in commit 7f6e852. I'd love to get this back upstream. |
So, love it is! :) 0bf1f87 |
I am unable to run all of the tests by calling
nosetests tests/
due to side effects in thetests/functional/test_runner.py
test cases.I've narrowed the failure down to the
@with_setup()
calls toprepare_stderr
andprepare_stdout
. It appears there's some side effect to callingCALLBACK_REGISTRY.clear()
andSTEP_REGISTRY.clear()
.Here's the test suite runs:
tests/functional/
all pass:Followed by:
But, when run together:
The text was updated successfully, but these errors were encountered: