Skip to content

Resetting bus to the initial state - #13

Open
sturmianseq wants to merge 1 commit into
seanpar203:masterfrom
sturmianseq:fix_test_suscribed_event_was_removed
Open

Resetting bus to the initial state#13
sturmianseq wants to merge 1 commit into
seanpar203:masterfrom
sturmianseq:fix_test_suscribed_event_was_removed

Conversation

@sturmianseq

Copy link
Copy Markdown

This PR aims to improve test reliability of test test_suscribed_event_was_removed by resetting bus to the initial state by calling EventBus.add_event

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

        if self._events[event] == event_funcs_copy:
            err_msg = "function doesn't exist inside event {} ".format(event)
>           raise EventDoesntExist(err_msg)
E           event_bus.exceptions.EventDoesntExist: function doesn't exist inside event event

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