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

TestFFDCAD.test_ffd_step_pipe_mod_through_files #257

Open
ndem0 opened this issue Nov 24, 2021 · 0 comments
Open

TestFFDCAD.test_ffd_step_pipe_mod_through_files #257

ndem0 opened this issue Nov 24, 2021 · 0 comments
Labels

Comments

@ndem0
Copy link
Member

ndem0 commented Nov 24, 2021

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');
@ndem0 ndem0 added the bug label Nov 24, 2021
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

1 participant