Skip to content

Reset the data in mi to the initial state - #2

Open
sturmianseq wants to merge 2 commits into
sushobhit27:masterfrom
sturmianseq:fix_test_modify
Open

Reset the data in mi to the initial state#2
sturmianseq wants to merge 2 commits into
sushobhit27:masterfrom
sturmianseq:fix_test_modify

Conversation

@sturmianseq

Copy link
Copy Markdown

This PR aims to improve test reliability of test test_modify by resetting the data in mi to the initial state by calling method mi.modify

The test can fail in this way by running pip3 install pytest-repeat; python3 -m pytest --count=2 multiindex/tests/test_multiindex.py::test_modify:

    def test_modify(mi):
>       mi.modify('emp_id', 786, 666)
...
>       setattr(obj, indexed_by, new_value)
E       AttributeError: 'NoneType' object has no attribute 'emp_id'

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