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

Improve pytest quality of life #10567

Merged
merged 3 commits into from
Jun 1, 2021

Conversation

ikonst
Copy link
Contributor

@ikonst ikonst commented Jun 1, 2021

strict_optional = saved
try:
yield
finally:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Prevents one failed tests from bleeding into another

@@ -50,6 +50,7 @@ def assert_string_arrays_equal(expected: List[str], actual: List[str],

Display any differences in a human-readable form.
"""
__tracebackhide__ = True
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@@ -326,18 +327,6 @@ def retry_on_error(func: Callable[[], Any], max_wait: float = 1.0) -> None:
raise
time.sleep(wait_time)

# TODO: assert_true and assert_false are redundant - use plain assert
Copy link
Contributor Author

@ikonst ikonst Jun 1, 2021

Choose a reason for hiding this comment

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

Follow up for PR #4369

assert is_more_precise(fx.b, fx.b)
assert is_more_precise(fx.b, fx.b)
assert is_more_precise(fx.b, fx.anyt)
assert is_more_precise(self.tuple(fx.b, fx.a,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Looks like the find and replace wasn't quite right

Copy link
Contributor Author

Choose a reason for hiding this comment

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

😅

Copy link
Collaborator

@hauntsaninja hauntsaninja left a comment

Choose a reason for hiding this comment

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

Thanks for improving this!

@hauntsaninja hauntsaninja merged commit 98ac487 into python:master Jun 1, 2021
@ikonst ikonst deleted the pytest-quality-of-life branch June 1, 2021 12:31
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

3 participants