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

refactor/fix: move logic into setup phase and correct order #88

Merged
merged 5 commits into from
Dec 22, 2021

Conversation

miketheman
Copy link
Owner

@miketheman miketheman commented Dec 20, 2021

When the plugin started out, I didn't know how to use the
runtest_setup phase, so I used an automatically-used fixture.
I've now removed the fixture, which may have had unintended side effects with other plugins or test suites.

I've also changed the ordering, to be more inline with the expected behaviors, as I laid out in #81 (comment)

I've added a bunch of tests that express the desired precedence behavior in a test module tests/test_precedence.py and all the existing tests pass as well 🎉 .

This, and a few other bits, should lead to an 0.50.0 release.

Signed-off-by: Mike Fiedler miketheman@gmail.com

@miketheman miketheman added the chore General maintenance items label Dec 20, 2021
@miketheman miketheman self-assigned this Dec 20, 2021
@miketheman miketheman added this to the 0.50.0 milestone Dec 20, 2021
@miketheman miketheman marked this pull request as draft December 21, 2021 16:39
When the plugin started out, I didn't know how to use the
`runtest_setup` phase, so I used an automatically-used fixture.

Once the hook usage was introduced, I can now consolidate a lot of the
behavior logic ion one place.

Signed-off-by: Mike Fiedler <miketheman@gmail.com>
May duplicate some of the other tests, but I wanted to make sure this
was clear.
I may refactor other tests later - it's unclear how to measure how many
times a line is hit right now.

Signed-off-by: Mike Fiedler <miketheman@gmail.com>
The previous configuration allowed for `allow-hosts` to be passed
without `--disable-socket` to implicitly activate blocking.

This was confusing and inconsistent so we now require it to enable the
global behavior.

This introduces a little more complexity to the setup method, but is
more clear as to what is actually happening.

Signed-off-by: Mike Fiedler <miketheman@gmail.com>
Signed-off-by: Mike Fiedler <miketheman@gmail.com>
Signed-off-by: Mike Fiedler <miketheman@gmail.com>
@codeclimate
Copy link

codeclimate bot commented Dec 22, 2021

Code Climate has analyzed commit d3d8e0f and detected 0 issues on this pull request.

View more on Code Climate.

@miketheman miketheman marked this pull request as ready for review December 22, 2021 19:44
@miketheman miketheman changed the title refactor: move logic into setup phase refactor/fix: move logic into setup phase and correct order Dec 22, 2021
@miketheman miketheman merged commit 224124a into main Dec 22, 2021
@miketheman miketheman deleted the miketheman/refactor-autouse branch December 22, 2021 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore General maintenance items
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant