Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

GH-130614: Add test suites for readable and writable pathlib paths #130648

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

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Naming
  • Loading branch information
barneygale committed Feb 28, 2025
commit e08f358707e81aea520beb7343edf976683480a5
8 changes: 4 additions & 4 deletions 8 Lib/test/test_pathlib/test_read.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from test.test_pathlib.support.zip_path import ReadableZipPath, ZipPathGround


class ReadablePathTest:
class ReadablePathTestBase:
def setUp(self):
self.root = self.ground.setup()
self.ground.create_hierarchy(self.root)
Expand Down Expand Up @@ -54,15 +54,15 @@ def test_read_text_with_newlines(self):
self.assertEqual(p.read_text(newline='\r\n'), 'abcde\r\nfghlk\n\rmnopq')


class ZipPathTest(ReadablePathTest, unittest.TestCase):
class ZipPathTest(ReadablePathTestBase, unittest.TestCase):
ground = ZipPathGround(ReadableZipPath)


class LocalPathTest(ReadablePathTest, unittest.TestCase):
class LocalPathTest(ReadablePathTestBase, unittest.TestCase):
ground = LocalPathGround(ReadableLocalPath)


class PathTest(ReadablePathTest, unittest.TestCase):
class PathTest(ReadablePathTestBase, unittest.TestCase):
ground = LocalPathGround(Path)


Expand Down
8 changes: 4 additions & 4 deletions 8 Lib/test/test_pathlib/test_write.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from test.test_pathlib.support.zip_path import WritableZipPath, ZipPathGround


class WritablePathTest:
class WritablePathTestBase:
def setUp(self):
self.root = self.ground.setup()

Expand Down Expand Up @@ -89,15 +89,15 @@ def test_symlink_to(self):
self.assertEqual(self.ground.readlink(link), 'fileA')


class ZipPathTest(WritablePathTest, unittest.TestCase):
class ZipPathTest(WritablePathTestBase, unittest.TestCase):
ground = ZipPathGround(WritableZipPath)


class LocalPathTest(WritablePathTest, unittest.TestCase):
class LocalPathTest(WritablePathTestBase, unittest.TestCase):
ground = LocalPathGround(WritableLocalPath)


class PathTest(WritablePathTest, unittest.TestCase):
class PathTest(WritablePathTestBase, unittest.TestCase):
ground = LocalPathGround(Path)


Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.