-
Notifications
You must be signed in to change notification settings - Fork 126
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
Remove duplicate 'firstresult' test #62
Remove duplicate 'firstresult' test #62
Conversation
woa weird.. Is my assertion wrong there? Ope, no, it comes from the last registered. Fixing... |
Remove `test_method_ordering.test_decorator_functional` as it is duplicate of an already incomplete test. Fix up `test_firstresult_definition` to be more more complete and actually test that when multiple hooks are registered for a spec marked with `firstresult` the first result is only ever returned. Fixes pytest-dev#61
0973973
to
20c352c
Compare
now thats a really interesting issue - this shouldn't happen - i was under the impression we would at least use registration order man seriously - every time i think there cant be a worse horror pytests legacy has one jsut ever more so "interesting" one |
I think the logic is that core hooks are registered first, user hooks are registered last. So they are called in reverse order so user hooks can override core hooks. But I agree it is slightly confusing. |
thanks for fixing the test - given the comments/properties i wonder if there is a more nice way to express the behaviour |
@RonnyPfannschmidt the label It's funny cause if you think about registration order it's more like |
The label |
@nicoddemus yeah good call. Do you mind making an issue? |
Definitely, done: #64 |
Remove
test_method_ordering.test_decorator_functional
as it isduplicate of an already incomplete test.
Fix up
test_firstresult_definition
to be more more complete and actually testthat when multiple hooks are registered for a spec marked with
firstresult
the first result is only ever returned.
Fixes #61