-
Notifications
You must be signed in to change notification settings - Fork 93
Add Python 3.12 to the test suite #764
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
Merged
mrbean-bremen
merged 14 commits into
pytest-dev:main
from
browniebroke:upgrade/python-3.12
Dec 22, 2022
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
ccd41d2
Add Python 3.12 to the test suite
browniebroke 3748e6a
Fix failures under Python 3.12
browniebroke 39a80cf
Mark Python 3.12 as experimental
browniebroke d0cfd0e
Add is_junction method to DirEntry class on Python 3.12
browniebroke 887d6b0
Implement stub functions for os.path.isjunction()
browniebroke 164879d
Always return false in stub junction functions
browniebroke ebd31f2
Skip extra deps tests for experimental jobs
browniebroke 2a60d68
Update changelog to mention support for Python 3.12
browniebroke dcdb458
Make junction APIs conditional on Python 3.12
browniebroke be93897
Simplify test suite workflow by removing experimental flag
browniebroke a0d1f72
Enable performance tests on Python 3.12
browniebroke cb03c5c
Fix condition
browniebroke 311c982
Fix grammar in docstrings
browniebroke f1b954b
Fix condition in workflow
browniebroke File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -513,6 +513,15 @@ def test_read_text(self): | |
file_path = self.path(self.make_path("text_file")) | ||
self.assertEqual(file_path.read_text(), "foo") | ||
|
||
@unittest.skipIf( | ||
sys.version_info < (3, 12), | ||
"is_junction method new in Python 3.12", | ||
) | ||
def test_is_junction(self): | ||
self.create_file(self.make_path("text_file"), contents="foo") | ||
file_path = self.path(self.make_path("text_file")) | ||
self.assertFalse(file_path.is_junction()) | ||
|
||
def test_read_text_with_encoding(self): | ||
self.create_file( | ||
self.make_path("text_file"), contents="ерунда", encoding="cyrillic" | ||
|
@@ -632,6 +641,7 @@ def test_symlink_to(self): | |
self.assertTrue(path.is_symlink()) | ||
|
||
@unittest.skipIf(sys.version_info < (3, 8), "link_to new in Python 3.8") | ||
@unittest.skipIf(sys.version_info >= (3, 12), "link_to removed in Python 3.12") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, this had been deprecated before (actually renamed to |
||
def test_link_to(self): | ||
self.skip_if_symlink_not_supported() | ||
file_name = self.make_path("foo", "bar.txt") | ||
|
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.
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.
This class attribute was present but seemingly unused before python/cpython#95450