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 d8796d1 commit 98bd6eb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "fs.dropboxfs"
version = "1.0.1"
version = "1.0.2"
description = "Pyfilesystem2 implementation for Dropbox"
authors = ["Rehan Khwaja <[email protected]>"]
license = "MIT"
Expand Down Expand Up @@ -47,7 +47,7 @@ pytest -n 8 || exit 1

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

Expand Down
11 changes: 10 additions & 1 deletion tests/test_dropboxfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,16 @@ def FullFS():
credentials = LoadCredentials()
return DropboxFS(refresh_token=credentials.get('refresh_token'), app_key=credentials.get('app_key'), app_secret=credentials.get('app_secret'))

class TestDropboxFS(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 TestDropboxFS(FSTestCases, TestCase, PyFsCompatLayer):
def make_fs(self):
self.fullFS = FullFS()
self.testSubdir = f'/tests/dropboxfs-test-{uuid4()}'
Expand Down

0 comments on commit 98bd6eb

Please sign in to comment.