Skip to content

Commit

Permalink
updated test data
Browse files Browse the repository at this point in the history
  • Loading branch information
ThePromidius committed Jan 18, 2024
1 parent 07a4395 commit 9a0917d
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 10 deletions.
5 changes: 0 additions & 5 deletions .github/workflows/Run_Tests.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: Python tests

on:
- push
- pull_request

jobs:
Expand All @@ -20,9 +19,5 @@ jobs:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- run: pip install -r requirements.txt
# - run: sudo apt install xvfb
# - name: Start xvfb
# run: |
# Xvfb :99 -screen 0 1920x1080x24 &disown
- name: Run the tests
run: python3 -m unittest discover -s tests -t .
2 changes: 1 addition & 1 deletion MangaTaggerLib/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ def levenshtein_distance_no_numpy(s1, s2):
else:
distance[i][j] = min(distance[i - 1][j] + 1, distance[i][j - 1] + 1, distance[i - 1][j - 1] + 1)

return distance[rows - 1][cols - 1]
return distance
def compare(s1, s2):
s1 = s1.lower().strip('/[^a-zA-Z ]/g", ')
s2 = s2.lower().strip('/[^a-zA-Z ]/g", ')
Expand Down
2 changes: 1 addition & 1 deletion tests/data/BLEACH/data.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": 30012,
"status": "FINISHED",
"synonyms": ["ブリーチ", "بلیچ", "سفید کننده"],
"synonyms": ["ブリーチ", "بلیچ", "سفید کننده","死神"],
"volumes": 74,
"siteUrl": "https://anilist.co/manga/30012",
"title": {
Expand Down
2 changes: 1 addition & 1 deletion tests/data/Hurejasik/data.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": 86964,
"status": "FINISHED",
"synonyms": ["BASTARD", "不肖子", "Ублюдок", "Bâtard", "Bastardo", "バスタード"],
"synonyms": ["BASTARD", "不肖子", "Ублюдок", "Bâtard", "Bastardo", "バスタード", "Kopile"],
"volumes": 5,
"siteUrl": "https://anilist.co/manga/86964",
"title": {
Expand Down
3 changes: 2 additions & 1 deletion tests/data/Naruto/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"type": "MANGA",
"genres": [
"Action",
"Adventure"
"Adventure",
"Supernatural"
],
"startDate": {
"day": 21,
Expand Down
2 changes: 1 addition & 1 deletion tests/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def test_metadata_case_4(self):

with open(Path(self.data_dir, title, self.data_file), encoding='utf-8') as data:
anilist_details = json.load(data)

self.MangaTaggerLib_AppSettings.adult_result = False
expected_manga_metadata = Metadata(title, {}, anilist_details)
actual_manga_metadata = metadata_tagger("NOWHERE", downloaded_title, '001', "MANGA", {}, None)

Expand Down

0 comments on commit 9a0917d

Please sign in to comment.