Skip to content
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

Various factors creating an unparsable rerun log #1

Open
stevejalim opened this issue Feb 10, 2014 · 4 comments
Open

Various factors creating an unparsable rerun log #1

stevejalim opened this issue Feb 10, 2014 · 4 comments
Assignees
Labels

Comments

@stevejalim
Copy link
Contributor

If the test run is killed mid-way, there's a risk of an incomplete test path being written to the log, which then causes an import error.

Separately, there are some (still unconfirmed) circumstances where a tests fails (quite possibly due to an import error) which then is handled poorly and a class from unittest is added to the rerun log. This, naturally, will cause the rerun log to fail.

@stevejalim stevejalim added the bug label Feb 10, 2014
@stevejalim stevejalim self-assigned this Feb 10, 2014
@hugorodgerbrown
Copy link
Member

Steve - this may be totally unrelated, but every now and then I get an import error somewhere, and a unittest reference ends up in rerun.txt (don't have the exact details), which then borks on the rerun?

@stevejalim
Copy link
Contributor Author

Ah, interesting. I know what that is: usually when a test is removed, say, and the whole TestCase is missing when rerun tries to run it (or there's an import error in the test which means the test is not discovered).

Will make sure that those references are not added to rerun log

[ ] Ensure that only full qualified test names, not test classes, can be added to rerun log

@stevejalim
Copy link
Contributor Author

As an example of a borked test leading to a unititest class name ending up in the rerun log:

unittest.loader.ModuleImportFailure.yunojuno.apps.profiles.tests.selenium_tests.test_briefs
unittest.loader.ModuleImportFailure.yunojuno.apps.profiles.tests.selenium_tests.test_example

@stevejalim stevejalim changed the title Too many tests to rerun can result in an unparsable rerun log Various factors creating an unparsable rerun log Dec 8, 2014
@gergelypolonkai
Copy link
Contributor

For this I have a workaround in my project’s Makefile:

sed -i 's/^unittest.loader.ModuleImportFailure.//' test_rerun.txt

Not too beautiful, but it works. I’m not sure if this should be solved on django-juno-testrunner’s side, as it seems to be a general problem for all runners.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants