PyGeM
PyGeM copied to clipboard
TestFFDCAD.test_ffd_step_pipe_mod_through_files
Describe the bug
The test_ffd_step_pipe_mod_through_files
fails because extra information depending on the running machine are stored in the test file, making extremely difficult to use these kind of test in CI.
To Reproduce
python -m pytest tests/test_ffdcad.py
Output
___________________ TestFFDCAD.test_ffd_step_pipe_mod_through_files ___________________
self = <tests.test_ffdcad.TestFFDCAD testMethod=test_ffd_step_pipe_mod_through_files>
def test_ffd_step_pipe_mod_through_files(self):
ffd = FFD(None,30,30,30,1e-4)
ffd.read_parameters(
filename='tests/test_datasets/parameters_test_ffd_iges.prm')
ffd('tests/test_datasets/test_pipe.step', 'test_pipe_result.step')
with open('test_pipe_result.step', "r") as created, \
open('tests/test_datasets/test_pipe_out_true.step', "r") as reference:
ref = reference.readlines()[92:]
cre = created.readlines()[92:]
> self.assertEqual(len(ref),len(cre))
E AssertionError: 12215 != 12216
tests/test_ffdcad.py:61: AssertionError
Additional context Here the diff between test and tested files:
#49 = PERSON('IP147.122.112,ndemo','286','Nicola',('Demo,A-70 | #49 = PERSON('IP127.0.1,amola','Mola,,,','Andrea',$,$,$);
'3787'),$,$); | #50 = ORGANIZATION('IP127.0.1','Unspecified','');
#50 = ORGANIZATION('IP147.122.112','Unspecified',''); <
#51 = PERSON_AND_ORGANIZATION_ROLE('creator'); #51 = PERSON_AND_ORGANIZATION_ROLE('creator');