Skip to content

Commit

Permalink
Add file-only and folder-only test model lists
Browse files Browse the repository at this point in the history
Adding `all_non_empty_directory_test_models` and `all_file_test_models`
lists that cover the corresponding fixtures to be able to use just these
subset of test models in testing, without having to list them one by
one.

Signed-off-by: Mihai Maruseac <mihaimaruseac@google.com>
  • Loading branch information
mihaimaruseac committed Jul 27, 2024
1 parent 2198c9d commit 681b487
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions model_signing/test_support.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,24 @@
]


# All directory models to use in testing, where only non empty directory models
# are supported. See also `all_test_models` comments.
all_non_empty_directory_test_models = [
"sample_model_folder",
"deep_model_folder",
"model_folder_with_empty_file",
"symlink_model_folder",
]


# All files models to use in testing, where only file models are supported.
all_file_test_models = [
"sample_model_file",
"empty_model_file",
"model_folder_with_empty_file",
]


def get_first_directory(path: pathlib.Path) -> pathlib.Path:
"""Returns the first directory that is a children of path.
Expand Down

0 comments on commit 681b487

Please sign in to comment.