Skip to content

Removing state pollution in zones#356

Open
sturmianseq wants to merge 1 commit into
santoshphilip:masterfrom
sturmianseq:fix_test_pythonic
Open

Removing state pollution in zones#356
sturmianseq wants to merge 1 commit into
santoshphilip:masterfrom
sturmianseq:fix_test_pythonic

Conversation

@sturmianseq

Copy link
Copy Markdown

This PR aims to improve test reliability of test test_pythonic by removing state pollution in python list zones by executing the test code with a deepcopy of zones.

The test can fail in this way if state pollution in zones is not removed:

        zonenames = [zone.Name for zone in zones]
>       assert printout == zonenames
E       AssertionError: assert ['PLENUM-1', ...PACE5-1', ...] == ['PLENUM-1', '...PACE5-1', ...]
E         At index 2 diff: 'SPACE2-1' != 'FIRST-SMALL-ZONE'
E         Full diff:
E         ['PLENUM-1',
E         'SPACE1-1',
E         -  'SPACE2-1',
E         +  'FIRST-SMALL-ZONE',
E         'SPACE3-1',...

@santoshphilip

Copy link
Copy Markdown
Owner

acknowledging your pull request.
I may take some time to get to this, as I am traveling now.

@sturmianseq

Copy link
Copy Markdown
Author

No worries! Take your time:)

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.

2 participants