Skip to content

Ignore _pytest.runner by default #2

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

Merged
merged 3 commits into from
Feb 8, 2019
Merged

Conversation

goodspark
Copy link

@goodspark goodspark commented Feb 8, 2019

This will fix pytest duration calculation.

PR is open again source (spulec#288), but there remains an open question on how they want to deal with a hack to increase coverage that's causing the tests to now fail, but the cause is not directly due to this change.

Sam Park added 3 commits February 8, 2019 07:59

Unverified

No user is associated with the committer email.
This will fix pytest duration calculation. Fixes spulec#286

Unverified

No user is associated with the committer email.
So that the change doesn't leak across tests

Unverified

No user is associated with the committer email.
@goodspark goodspark requested a review from rouge8 February 8, 2019 18:21
@rouge8 rouge8 changed the base branch from master to goodrx February 8, 2019 18:26
Copy link

@rouge8 rouge8 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is spulec#288 failing upstream? 😕

@goodspark
Copy link
Author

Cuz of the stack limit coverage hack I was talking about. From what I can tell that limit changes how deep into the stack frames freezegun will look into. If it finds something to ignore, it won't patch/fake time.

But that limit change has a comment "just to increase coverage". If you revert my change and remove the tests still pass. So that isn't actually testing anything. Just increasing coverage.

But I'm not sure why this change actually prevents the fix from working. But since 99% of the time I'm sure people won't change this undocumented limit, I don't think it matters.

@rouge8
Copy link

rouge8 commented Feb 8, 2019

hmmmm okay

@goodspark
Copy link
Author

If you're curious, take a look at api.py and look at _should_use_real_time

@goodspark goodspark merged commit 6ca82ae into goodrx Feb 8, 2019
@goodspark goodspark deleted the fix/pytest-durations branch February 8, 2019 18:49
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.

None yet

2 participants