#10150: sys.stdin now contains all expected methods of a file-like object when capture is enabled. pytest.ini as an alternative to pytest.ini. #9987: Added support for hidden configuration file by allowing. #9920: Display full crash messages in short test summary info, when running in a CI environment. #9883: Normalize the help description of all command-line options. #9873: Some coloring has been added to the short test summary. #9823: Improved error message that is shown when no collector is found for a given file. #9742: Display assertion message without escaped newline characters with -vv. Tomli is no longer a dependency on Python 3.11. #9741: On Python 3.11, use the standard library’s tomllib to parse TOML. We now raise immediately with a more helpful message. Previously passing an empty tuple would give a confusingĮrror. #8508: Introduce multiline display for warning matching via pytest.warns() andĮnhance match comparison for _pytest._() as returned by pytest.raises(). #3426: Assertion failures with strings in NFC and NFD forms that normalize to the same string now have a dedicated error message detailing the issue, and their utf-8 representation is expressed instead. This can be passed directly to tests to override -showlocals declared through addopts. #10381: The -no-showlocals flag has been added. (Note that str, which is itself a Sequence, is still treated as a #10218: (and similar functions) now accepts any Sequence for the argument names, #9897: Added shell-style wildcard support to testpaths. The plan is to make returning non- None from tests an error in the future. This prevents a common mistake among beginners that expect that returning a bool (for example return foo(a, b) = result) would cause a test to pass or fail, instead of using assert. #7337: A deprecation warning is now emitted if a test function returns something other than None. Plain setup and teardown functions and methods: this might catch users by surprise, as setup() and teardown() are not pytest idioms, but part of the nose support.įor more details, consult the deprecation docs. #9886: The functionality for running tests written for nose has been officially deprecated. Instead use pytest.hookimpl() and pytest.hookspec(). #4562: Deprecate configuring hook specs/impls using attributes/marks. If you need other py.* modules, continue to install the deprecated py library separately, otherwise it can usually be removed as a dependency. pytest provides a vendored copy of py.error and py.path modules but will use the py library if it is installed. #10396: pytest no longer depends on the py library. #10012: Update pytest.PytestUnhandledCoroutineWarning to a deprecation it will raise an error in pytest 8. #10641: Fix a race condition when creating or updating the stepwise plugin’s cache, which could occur when multiple xdist worker nodes try to simultaneously update the stepwise plugin’s cache. #10607: Fix a race condition when creating junitxml reports, which could occur when multiple instances of pytest execute in parallel. #10506: Fix bug where sometimes pytest would use the file system root directory as rootdir on Windows. #10457: If a test is skipped from inside a fixture, the test summary now shows the test location instead of the fixture location. #10452: Fix ‘’ deprecation warning in Python 3.12. #10753: Changed wording of the module level skip to be very explicitĪbout not collecting tests and not executing the rest of the module. #10721: Fixed entry-points declaration in the documentation example using Hatch. #10690: Added CI and BUILD_NUMBER environment variables to the documentation. else nullcontext() down to ‘ContextManager’ rather than ‘object’. #10660: Fixed pytest.raises() to return a ‘ContextManager’ so that type-checkers could narrow #10626: Fixed crash if -fixtures and -help are passed at the same time. #10597: Fixed bug where a fixture method named teardown would be called as part of nose teardown stage. #10592: Fixed crash if -cache-show and -help are passed at the same time. #10533: Fixed pytest.approx() handling of dictionaries containing one or more values of 0.0. With advance notice in the Deprecations section of releases. ).īackward incompatible (breaking) changes will only be introduced in major versions
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |