-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Release 5.1.0 #5748
Merged
Merged
Release 5.1.0 #5748
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…features Merge master into features
It is no longer deprecated, but part of the normal code for 'config'
Those are not really deprecated anymore and are part of the normal code for config
This is no longer a deprecation so it makes sense to move it to the place where it is needed instead of leaving it in deprecated.py
…ments As suggested during review
Hopefully by Python 3.9 this will be fixed upstream, if not we will need to bump the version again. Fix pytest-dev#5523
…est-dev#5539) Replace importlib_metadata with importlib.metadata on Python 3.8+
These attributes can be used to access the unchanged arguments passed to pytest.main(). The intention is to use these attributes to initialize workers in the same manner as the master node is initialized in pytest-xdist.
…rences When enabled, floating-point numbers only need to match as far as the precision you have written in the expected doctest output. This avoids false positives caused by limited floating-point precision, like this: Expected: 0.233 Got: 0.23300000000000001 This is inspired by Sébastien Boisgérault's [numtest] but the implementation is a bit different: * This implementation edits the literals that are in the "got" string (the actual output from the expression being tested), and then proceeds to compare the strings literally. This is similar to pytest's existing ALLOW_UNICODE and ALLOW_BYTES implementation. * This implementation only compares floats against floats, not ints against floats. That is, the following doctest will fail with pytest whereas it would pass with numtest: >>> math.py # doctest: +NUMBER 3 This behaviour should be less surprising (less false negatives) when you enable NUMBER globally in pytest.ini. Advantages of this implementation compared to numtest: * Doesn't require `import numtest` at the top level of the file. * Works with pytest (if you try to use pytest & numtest together, pytest raises "TypeError: unbound method check_output() must be called with NumTestOutputChecker instance as first argument (got LiteralsOutputChecker instance instead)"). * Works with Python 3. [numtest]: https://github.com/boisgera/numtest
* Move the parts about "how to configure it" (pytest.ini vs. inline comment) together. * Move `--doctest-continue-on-failure` into its own sub-heading, as it isn't related to the doctest optionflags.
Merge master into features
Add a very lax mypy configuration, add it to tox -e linting, and fix/ignore the few errors that come up. The idea is to get it running before diving in too much. This enables: - Progressively adding type annotations and enabling more strict options, which will improve the codebase (IMO). - Annotating the public API in-line, and eventually exposing it to library users who use type checkers (with a py.typed file). Though, none of this is done yet. Refs pytest-dev#3342.
Add rudimentary mypy type checking
Apperently it does not hang, let's see how it fares on CI
Validate xunit2 files against the schema
Remove unused function CallSpec2.setall
This creates a separate section from 'features' for small changes which don't usually require user intervention, such as: * Human readable session duration * New junitxml fields * Improved colors in terminal * etc. The idea is to better match user expectations about new actual features in the "Features" section of the changelog.
…elog Add new 'improvement' changelog category
Merge master into features
Show session duration in human-readable format
Previously it would say: > assert '123456789012...901234567890A' == '1234567890123...901234567890B'" This makes it look like the "3" might be different already. This is clearer, and it is OK to have potentially one less char in the right one: > assert '123456789012...901234567890A' == '123456789012...901234567890B'"
`ast.parse("None")` was added/used in 3e6f1fa for differences between Python 2/3, but we do not support py2 anymore.
assertion.rewrite: use ast.NameConstant(None) directly
assertrepr_compare: prefer same maxsize
Publish GitHub release notes after deployment
"pexpect" can be imported on Windows, but does not have "pexpect.spawn" then. Ref: https://github.com/pexpect/pexpect/blob/a803933ed53/pexpect/__init__.py#L73-L76
pytester: spawn: skip without pexpect.spawn
I was doing final tests on the script today, and forgot to change the hardecoded "pytest-dev/pytest", which ended up publishing a `4.99.10` release to the main repository by mistake, as my token has access to both my fork and main repository. I deleted the tag immeditely just a few seconds later, so hopefully this won't cause major problems. This change makes it safer to test this in the future, never publishing to the main repository by mistake (as long as the tags are pushed to the right repositories of course).
Use TRAVIS_REPO_SLUG instead of hard-coding pytest-dev/pytest
Conflicts: src/_pytest/outcomes.py
Merge master into features
asottile
approved these changes
Aug 15, 2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
717839f
to
eaf7ce9
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.