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

UnitTests conflict: UnitTestMCNPInput.py conflict with UnitTestMCNPMaterial.py #58

Open
gvozdila opened this issue Oct 20, 2020 · 0 comments

Comments

@gvozdila
Copy link

There are two ways to run all tests:

  1. with ./run_tests -- this one passed
  2. with csg2csg/test> python3 -m unittest discover -p 'Unit*.py' (or by IDE, ERIC6 for example)
    in case 2) there are errors:
    ======================================================================
    FAIL: test_mcnp_material (UnitTestMCNPMaterial.TestMCNPMaterial)

Traceback (most recent call last):
File "/mnt/newdisk1/work/build/csg2csg/csg2csg/test/UnitTestMCNPMaterial.py", line 29, in test_mcnp_material
self.assertEqual(len(matcard.xsid_dictionary),2)
AssertionError: 4 != 2

======================================================================
FAIL: test_mcnp_material_with_duplicates (UnitTestMCNPMaterial.TestMCNPMaterial)

Traceback (most recent call last):
File "/mnt/newdisk1/work/build/csg2csg/csg2csg/test/UnitTestMCNPMaterial.py", line 55, in test_mcnp_material_with_duplicates
self.assertEqual(len(matcard.xsid_dictionary),2)
AssertionError: 4 != 2

======================================================================
FAIL: test_serpent_material (UnitTestSerpentMaterial.TestSerpentMaterial)

Traceback (most recent call last):
File "/mnt/newdisk1/work/build/csg2csg/csg2csg/test/UnitTestSerpentMaterial.py", line 31, in test_serpent_material
self.assertEqual(len(matcard.xsid_dictionary),2)
AssertionError: 4 != 2

Looks like somehow UnitTestMCNPInput change state of system before running UnitTestSerpentMaterial and UnitTestMCNPMaterial.
And it makes tests to fail.

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

No branches or pull requests

1 participant