Repository navigation
Conversation
Allow other tests to check the properties of discovered tests.
The working directory was resolved at configuration time, so the tests ran from the real path even when a symbolic link was given. A build tree configured through a link could not run its tests once the link targeted another location. The working directory is now only made absolute. Test collection still resolves it, as Pytest resolves symbolic links in the invocation directory but not in 'rootdir' (pytest-dev/pytest#12291).
This branch has not been deployed
This file contains hidden or 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
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.
Fixes #69.
pytest_discover_testsresolvedWORKING_DIRECTORYat configure time, so tests always ran from the real path, even when a symbolic link was given. A build tree configured through a link could not run its tests once the link targeted another location.Changes
FindPytest.cmake:WORKING_DIRECTORYis made absolute (ABSOLUTE) instead of resolved (REALPATH). This is the value stored in the tests'WORKING_DIRECTORYproperty.PytestAddTests.cmake: test collection resolves the path at build time and uses it for both--rootdirand the collection directory, keeping the 0.5.2 fix for Incorrect confcutdir inferred when rootdir is under a symlink directory pytest-dev/pytest#12291.test/07-working-directory: also discovers and runs tests through a link to the test directory, and checks theirWORKING_DIRECTORYproperty. The link is a junction on Windows, as it does not require elevated privileges. To share the property check,check_test_property.cmakemoved fromtest/05-propertiestotest/utils.Bundled tests are unchanged, as they are not collected.