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

Removing state pollution in idd_commlst #358

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sturmianseq
Copy link

This PR aims to improve test reliability of test test_group2commlst by removing state pollution in idd_commlst by making a deepcopy

The test can fail in this way by running pip3 install pytest-repeat; python3 -m pytest --count=2 $test_path:

        for (groupcommlst,) in data:
            glist = iddgroups.iddtxt2grouplist(iddtxt)
            result = iddgroups.group2commlst(idd_commlst, glist)
>           assert result == groupcommlst
E           AssertionError: assert [[['group Non...t 7.0']], ...] == [[['group Non...t 7.0']], ...]
E             At index 0 diff: [['group None', 'idfobj Lead Input', 'group None', 'idfobj Lead Input']] != [['group None', 'idfobj Lead Input']]
E             Full diff:
E               [
E                [['group None',
E             +    'idfobj Lead Input',
E             +    'group None',
E                  'idfobj Lead Input']],...
E             
E             ...Full output truncated (60 lines hidden), use '-vv' to show

It may be better to clean state pollutions so that some other tests won't fail in the future due to the shared state pollution.

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

Successfully merging this pull request may close these issues.

1 participant