Skip to content
Snippets Groups Projects
Verified Commit 32ede50b authored by Yoann Schneider's avatar Yoann Schneider :tennis:
Browse files

add tests

parent 98137073
No related branches found
No related tags found
1 merge request!267Properly compute files hashes during models publication
Pipeline #79881 passed
......@@ -280,6 +280,11 @@ def model_file_dir():
return SAMPLES_DIR / "model_files"
@pytest.fixture
def model_file_dir_with_subfolder():
return SAMPLES_DIR / "root_folder"
@pytest.fixture
def fake_dummy_worker():
api_client = MockApiClient()
......
Wow this is actually the data of the best model ever created on Arkindex
\ No newline at end of file
Wow this is actually the data of the best model ever created on Arkindex
\ No newline at end of file
Wow this is actually the data of the best model ever created on Arkindex
\ No newline at end of file
......@@ -45,6 +45,24 @@ def test_create_archive(model_file_dir):
assert not os.path.exists(zst_archive_path), "Auto removal failed"
def test_create_archive_with_subfolder(model_file_dir_with_subfolder):
"""Create an archive when the model's file is in a folder containing a subfolder"""
with create_archive(path=model_file_dir_with_subfolder) as (
zst_archive_path,
hash,
size,
archive_hash,
):
assert os.path.exists(zst_archive_path), "The archive was not created"
assert (
hash == "3e453881404689e6e125144d2db3e605"
), "Hash was not properly computed"
assert 300 < size < 1500
assert not os.path.exists(zst_archive_path), "Auto removal failed"
@pytest.mark.parametrize(
"tag, description",
[
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment