Skip to content
This repository has been archived by the owner on Dec 2, 2022. It is now read-only.

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fcakyon committed Aug 18, 2020
1 parent e5c5bc0 commit 906e02d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion midv500/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def list_annotation_paths_recursively(directory: str, ignore_background_only_one

abs_filepath = abs_filepath.replace("\\", "/") # for windows
relative_filepath = abs_filepath.split(directory)[-1] # get relative path from abs path
relative_filepath = [relative_filepath[1:] if relative_filepath[0] == "/" else relative_filepath]
relative_filepath = [relative_filepath[1:] if relative_filepath[0] == "/" else relative_filepath][0]
relative_filepath_list.append(relative_filepath)

number_of_files = len(relative_filepath_list)
Expand Down
1 change: 1 addition & 0 deletions tests/test_unit.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ def test_list_annotation_paths_recursively(self):
# read annotations paths
annotation_paths = list_annotation_paths_recursively(directory, ignore_background_only_ones=True)
self.assertEqual(len(annotation_paths), 90)
self.assertEqual(annotation_paths[3], '01_alb_id/ground_truth/HA/HA01_04.json')

def test_download(self):
from midv500.utils import download
Expand Down

0 comments on commit 906e02d

Please sign in to comment.