Skip to content

Commit

Permalink
Add workaround from pyfatfs
Browse files Browse the repository at this point in the history
  • Loading branch information
rkhwaja committed Nov 20, 2023
1 parent 26a77d2 commit 24f18ea
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ coverage xml

[tool.ruff]
line-length = 1000
ignore = ["ANN", "B011", "COM812", "D", "DTZ", "EM", "ERA001", "FBT002", "FIX", "G004", "I", "N802", "N803", "N806", "N816", "PLR0913", "PTH", "S101", "T201", "TD", "TRY003", "W191"]
ignore = ["ANN", "B011", "COM812", "D", "DTZ", "EM", "ERA001", "FBT002", "FIX", "G004", "I", "N802", "N803", "N806", "N815", "N816", "PLR0913", "PTH", "S101", "T201", "TD", "TRY003", "W191"]
select = ["ALL"]
target-version = "py37"

Expand Down
11 changes: 10 additions & 1 deletion tests/test_onedrivefs.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,16 @@ def test_opener_format():
assert isinstance(fs, SubFS), str(fs)
assert fs._sub_dir == f'/{_SAFE_TEST_DIR}' # noqa: SLF001

class TestOneDriveFS(FSTestCases, TestCase):
class PyFsCompatLayer:
"""PyFilesystem2 Python 3.12 compatibility layer.
Adds a workaround for PyFilesystem2#568:
https://github.com/PyFilesystem/pyfilesystem2/issues/568
"""

assertRaisesRegexp = TestCase.assertRaisesRegex

class TestOneDriveFS(FSTestCases, TestCase, PyFsCompatLayer):
def make_fs(self):
self.fullFS = FullFS()
self.testSubdir = f'/{_SAFE_TEST_DIR}/{uuid4()}'
Expand Down

0 comments on commit 24f18ea

Please sign in to comment.