You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
xUnit test runner fails to find module dictionary #372
Submitting this since this is a completely different issue that the ones we saw with nUnit and mstests. I was testing it as an alternative for #371 and found a different slew of issues.
The goal of this issue is to understand why pythonnet is behaving this way when being run from xUnit.
failed with and without it. I converted and rewrote the entire test suite and tried it multiple ways, none of them worked. This was just one of the simplest ways to reproduce it
It doesn't show a review or comment from you. Didn't ignore it on purpose.
The commit actually is preventing the lockup that was causing the previous crash. But there is still more work need to properly fix the issue.
This looks to be yet another issue w gc. If only 1 test is run, test will run, pass but xUnit will not exit, just hang. If two tests are run, then xUnit will crash and/or hang. This can be similarly reproduced on NUnit by using --dispose-runners option.
xUnit by default disposes of its objects after every test. NUnit on the other hand doesn't really, and --dispose-runners forces objects to be disposed after being used; meant to be used on system with low resources.
Activity
vmuriart commentedon Feb 9, 2017
Submitting this since this is a completely different issue that the ones we saw with
nUnitandmstests. I was testing it as an alternative for #371 and found a different slew of issues.The goal of this issue is to understand why
pythonnetis behaving this way when being run fromxUnit.den-run-ai commentedon Feb 9, 2017
Don't you need to shutdown the interpreter in the teardown?
vmuriart commentedon Feb 10, 2017
failed with and without it. I converted and rewrote the entire test suite and tried it multiple ways, none of them worked. This was just one of the simplest ways to reproduce it
den-run-ai commentedon Feb 10, 2017
@vmuriart did you try xunit locally? with debugger?
den-run-ai commentedon Feb 10, 2017
According to this SO answer, it is likely that some CPython threads are killed during process exit, that's why we get these errors:
http://stackoverflow.com/questions/17679715/fatal-python-error-pyimport-getmoduledict-no-module-dictionary
vmuriart commentedon Feb 10, 2017
Nice find! We still have pending issues w our finalizers. This & the NUnit App unloading are related to it most likely
den-run-ai commentedon Feb 10, 2017
@vmuriart yep, one of my comments in finalizer pull request was ignored (i hope it does not cause deadlocks):
https://github.com/pythonnet/pythonnet/pull/365/files/c954442c3f2ae594ca318f298ebd4607ea7fab3d#r99997577
vmuriart commentedon Feb 10, 2017
Did you hit submit on the review? I don't see any comment, and I been having issues w the review holding my comments until i submit my review
den-run-ai commentedon Feb 10, 2017
vmuriart commentedon Feb 10, 2017
It doesn't show a review or comment from you. Didn't ignore it on purpose.
The commit actually is preventing the lockup that was causing the previous crash. But there is still more work need to properly fix the issue.
vmuriart commentedon Mar 24, 2017
This looks to be yet another issue w
gc. If only 1 test is run, test will run, pass but xUnit will not exit, just hang. If two tests are run, then xUnit will crash and/or hang. This can be similarly reproduced on NUnit by using--dispose-runnersoption.xUnitby default disposes of its objects after every test.NUniton the other hand doesn't really, and--dispose-runnersforces objects to be disposed after being used; meant to be used on system with low resources.filmor commentedon Aug 6, 2021
We don't use xUnit (anymore).