Skip to content

Commit

Permalink
fix: testdata path
Browse files Browse the repository at this point in the history
  • Loading branch information
vvanglro committed Aug 3, 2023
1 parent 6ffa5cb commit 8665ebd
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 20 deletions.
4 changes: 2 additions & 2 deletions tests/test_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
],
)
def test_is_app_from_bytes(file_name, mime_type, extension):
with open(f"../testdata/{file_name}", "rb") as f:
with open(f"testdata/{file_name}", "rb") as f:
py_magic = from_bytes(f.read())
assert py_magic.mime_type() == mime_type
assert py_magic.extension() == extension
Expand Down Expand Up @@ -47,7 +47,7 @@ def test_is_app_from_bytes(file_name, mime_type, extension):
],
)
def test_is_app_from_path(file_name, mime_type, extension):
py_magic = from_path(f"../testdata/{file_name}")
py_magic = from_path(f"testdata/{file_name}")
assert py_magic.mime_type() == mime_type
assert py_magic.extension() == extension
assert py_magic.is_app()
Expand Down
4 changes: 2 additions & 2 deletions tests/test_archive.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
],
)
def test_is_archive_from_bytes(file_name, mime_type, extension):
with open(f"../testdata/{file_name}", "rb") as f:
with open(f"testdata/{file_name}", "rb") as f:
py_magic = from_bytes(f.read())
assert py_magic.mime_type() == mime_type
assert py_magic.extension() == extension
Expand All @@ -37,7 +37,7 @@ def test_is_archive_from_bytes(file_name, mime_type, extension):
],
)
def test_is_archive_from_path(file_name, mime_type, extension):
py_magic = from_path(f"../testdata/{file_name}")
py_magic = from_path(f"testdata/{file_name}")
assert py_magic.mime_type() == mime_type
assert py_magic.extension() == extension
assert py_magic.is_app() is False
Expand Down
4 changes: 2 additions & 2 deletions tests/test_audio.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
],
)
def test_is_audio_from_bytes(file_name, mime_type, extension):
with open(f"../testdata/{file_name}", "rb") as f:
with open(f"testdata/{file_name}", "rb") as f:
py_magic = from_bytes(f.read())
assert py_magic.mime_type() == mime_type
assert py_magic.extension() == extension
Expand All @@ -37,7 +37,7 @@ def test_is_audio_from_bytes(file_name, mime_type, extension):
],
)
def test_is_audio_from_path(file_name, mime_type, extension):
py_magic = from_path(f"../testdata/{file_name}")
py_magic = from_path(f"testdata/{file_name}")
assert py_magic.mime_type() == mime_type
assert py_magic.extension() == extension
assert py_magic.is_app() is False
Expand Down
4 changes: 2 additions & 2 deletions tests/test_book.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
],
)
def test_is_book_from_bytes(file_name, mime_type, extension):
with open(f"../testdata/{file_name}", "rb") as f:
with open(f"testdata/{file_name}", "rb") as f:
py_magic = from_bytes(f.read())
assert py_magic.mime_type() == mime_type
assert py_magic.extension() == extension
Expand All @@ -33,7 +33,7 @@ def test_is_book_from_bytes(file_name, mime_type, extension):
],
)
def test_is_book_from_path(file_name, mime_type, extension):
py_magic = from_path(f"../testdata/{file_name}")
py_magic = from_path(f"testdata/{file_name}")
assert py_magic.mime_type() == mime_type
assert py_magic.extension() == extension
assert py_magic.is_app() is False
Expand Down
4 changes: 2 additions & 2 deletions tests/test_doc.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
],
)
def test_is_doc_from_bytes(file_name, mime_type, extension):
with open(f"../testdata/{file_name}", "rb") as f:
with open(f"testdata/{file_name}", "rb") as f:
py_magic = from_bytes(f.read())
assert py_magic.mime_type() == mime_type
assert py_magic.extension() == extension
Expand Down Expand Up @@ -62,7 +62,7 @@ def test_is_doc_from_bytes(file_name, mime_type, extension):
],
)
def test_is_doc_from_path(file_name, mime_type, extension):
py_magic = from_path(f"../testdata/{file_name}")
py_magic = from_path(f"testdata/{file_name}")
assert py_magic.mime_type() == mime_type
assert py_magic.extension() == extension
assert py_magic.is_app() is False
Expand Down
4 changes: 2 additions & 2 deletions tests/test_font.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
],
)
def test_is_font_from_bytes(file_name, mime_type, extension):
with open(f"../testdata/{file_name}", "rb") as f:
with open(f"testdata/{file_name}", "rb") as f:
py_magic = from_bytes(f.read())
assert py_magic.mime_type() == mime_type
assert py_magic.extension() == extension
Expand All @@ -31,7 +31,7 @@ def test_is_font_from_bytes(file_name, mime_type, extension):
],
)
def test_is_font_from_path(file_name, mime_type, extension):
py_magic = from_path(f"../testdata/{file_name}")
py_magic = from_path(f"testdata/{file_name}")
assert py_magic.mime_type() == mime_type
assert py_magic.extension() == extension
assert py_magic.is_app() is False
Expand Down
4 changes: 2 additions & 2 deletions tests/test_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
],
)
def test_is_image_from_bytes(mime_type, extension, file_name):
with open(f"../testdata/{file_name}", "rb") as f:
with open(f"testdata/{file_name}", "rb") as f:
py_magic = from_bytes(f.read())
assert py_magic.mime_type() == mime_type
assert py_magic.extension() == extension
Expand Down Expand Up @@ -59,7 +59,7 @@ def test_is_image_from_bytes(mime_type, extension, file_name):
],
)
def test_is_image_from_path(file_name, mime_type, extension):
py_magic = from_path(f"../testdata/{file_name}")
py_magic = from_path(f"testdata/{file_name}")
assert py_magic.mime_type() == mime_type
assert py_magic.extension() == extension
assert py_magic.is_app() is False
Expand Down
4 changes: 2 additions & 2 deletions tests/test_odf.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
],
)
def test_is_odf_from_bytes(file_name, mime_type, extension):
with open(f"../testdata/{file_name}", "rb") as f:
with open(f"testdata/{file_name}", "rb") as f:
py_magic = from_bytes(f.read())
assert py_magic.mime_type() == mime_type
assert py_magic.extension() == extension
Expand All @@ -35,7 +35,7 @@ def test_is_odf_from_bytes(file_name, mime_type, extension):
],
)
def test_is_odf_from_path(file_name, mime_type, extension):
py_magic = from_path(f"../testdata/{file_name}")
py_magic = from_path(f"testdata/{file_name}")
assert py_magic.mime_type() == mime_type
assert py_magic.extension() == extension
assert py_magic.is_app() is False
Expand Down
4 changes: 2 additions & 2 deletions tests/test_text.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
],
)
def test_is_text_from_bytes(file_name, mime_type, extension):
with open(f"../testdata/{file_name}", "rb") as f:
with open(f"testdata/{file_name}", "rb") as f:
py_magic = from_bytes(f.read())
assert py_magic.mime_type() == mime_type
assert py_magic.extension() == extension
Expand All @@ -37,7 +37,7 @@ def test_is_text_from_bytes(file_name, mime_type, extension):
],
)
def test_is_text_from_path(file_name, mime_type, extension):
py_magic = from_path(f"../testdata/{file_name}")
py_magic = from_path(f"testdata/{file_name}")
assert py_magic.mime_type() == mime_type
assert py_magic.extension() == extension
assert py_magic.is_app() is False
Expand Down
4 changes: 2 additions & 2 deletions tests/test_video.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
],
)
def test_is_video_from_bytes(mime_type, extension, file_name):
with open(f"../testdata/{file_name}", "rb") as f:
with open(f"testdata/{file_name}", "rb") as f:
py_magic = from_bytes(f.read())
assert py_magic.mime_type() == mime_type
assert py_magic.extension() == extension
Expand Down Expand Up @@ -43,7 +43,7 @@ def test_is_video_from_bytes(mime_type, extension, file_name):
],
)
def test_is_video_from_path(file_name, mime_type, extension):
py_magic = from_path(f"../testdata/{file_name}")
py_magic = from_path(f"testdata/{file_name}")
assert py_magic.mime_type() == mime_type
assert py_magic.extension() == extension
assert py_magic.is_app() is False
Expand Down

0 comments on commit 8665ebd

Please sign in to comment.