Skip to content

Commit

Permalink
fix g_appledict_test.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ilius committed Jun 16, 2024
1 parent f5c3210 commit fa9bccd
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ lint.dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
"ANN",
"T201",
"PLR6301", # Method `...` could be a function, class method, or static method
"E501", # Line too long
]
"*_test.py" = [
"ANN",
Expand Down
25 changes: 13 additions & 12 deletions tests/g_appledict_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ def __init__(self, *args, **kwargs):

hashDict = {
"appledict-src/002-no-morphology-v3.txt": "d8086fe8",
"appledict-src/002-no-morphology-v3/002-no-morphology-v3.css": "6818c1e5",
"appledict-src/002-no-morphology-v3/002-no-morphology-v3.plist": "f9f6ff31",
"appledict-src/002-no-morphology-v3/002-no-morphology-v3.xml": "707994d6",
"appledict-src/002-no-morphology-v3/Makefile": "65f736b6",
"appledict-src/002-no-morphology-v3a/002-no-morphology-v3a.css": "6818c1e5",
"appledict-src/002-no-morphology-v3a/002-no-morphology-v3a.plist": "706d1d9c",
"appledict-src/002-no-morphology-v3a/002-no-morphology-v3a.xml": "707994d6",
"appledict-src/002-no-morphology-v3a/Makefile": "ecd42350",
}
self.dataFileCRC32.update(hashDict)

Expand All @@ -34,15 +34,16 @@ def comparePlist(self, fpath1, fpath2):
def test_tabfile_without_morpho_to_appledict_source(self):
self.glos = Glossary()

baseName = "002-no-morphology-v3"
inputFilepath = self.downloadFile(f"appledict-src/{baseName}.txt")
outputDirPath = self.newTempFilePath(f"{baseName}")
inputName = "002-no-morphology-v3"
outputName = "002-no-morphology-v3a"
inputFilepath = self.downloadFile(f"appledict-src/{inputName}.txt")
outputDirPath = self.newTempFilePath(f"{outputName}")

expectedFiles = {
name: self.downloadFile(f"appledict-src/{baseName}/{name}")
name: self.downloadFile(f"appledict-src/{outputName}/{name}")
for name in [
f"{baseName}.xml",
f"{baseName}.css",
f"{outputName}.xml",
f"{outputName}.css",
"Makefile",
]
}
Expand All @@ -63,8 +64,8 @@ def test_tabfile_without_morpho_to_appledict_source(self):
)

self.comparePlist(
join(outputDirPath, f"{baseName}.plist"),
self.downloadFile(f"appledict-src/{baseName}/{baseName}.plist"),
join(outputDirPath, f"{outputName}.plist"),
self.downloadFile(f"appledict-src/{outputName}/{outputName}.plist"),
)


Expand Down

0 comments on commit fa9bccd

Please sign in to comment.