-
Notifications
You must be signed in to change notification settings - Fork 248
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1336 from pypa/test-cwd-error-message
Add test failure with descriptive error message when running tests without a {project} placeholder
- Loading branch information
Showing
6 changed files
with
80 additions
and
10 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# this file is copied to the testing cwd, to raise the below error message if | ||
# pytest/unittest is run from there. | ||
|
||
import unittest | ||
|
||
|
||
class TestStringMethods(unittest.TestCase): | ||
def test_fail(self): | ||
self.fail( | ||
"cibuildwheel executes tests from a different working directory to " | ||
"your project. This ensures only your wheel is imported, preventing " | ||
"Python from accessing files that haven't been packaged into the " | ||
"wheel. Please specify a path to your tests when invoking pytest " | ||
"using the {project} placeholder, e.g. `pytest {project}` or " | ||
"`pytest {project}/tests`. cibuildwheel will replace {project} with " | ||
"the path to your project." | ||
) |
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
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
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