Skip to content

Commit 1ed215d

Browse files
committed
test_coverlovin2 add test_process_dirs empty case
1 parent 5ce15d7 commit 1ed215d

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

coverlovin2/test/test_coverlovin2.py

+15-4
Original file line numberDiff line numberDiff line change
@@ -1248,10 +1248,21 @@ def test_process_dir(self, dirp: Path, image_nt: str, qsize, daa_list_expect):
12481248
assert daa_list == daa_list_expect
12491249
assert qsize == sq.qsize()
12501250

1251-
# TODO: add testing of process_dir that exercises more code
1252-
# need to add test "album" directories
1253-
#def test_process_dirs(self):
1254-
# return True
1251+
res1e = resources.joinpath('test_process_dirs_1_empty')
1252+
1253+
@pytest.mark.parametrize(
1254+
"dirpl, image_nt, qsize, daa_list_expect",
1255+
(
1256+
pytest.param(
1257+
[res1e,], "cover.jpg", 0, [],
1258+
),
1259+
),
1260+
# TODO: add variations
1261+
)
1262+
def test_process_dirs(self, dirpl, image_nt, qsize, daa_list_expect):
1263+
sq = queue.SimpleQueue()
1264+
rets = process_dirs(dirpl, image_nt, ImageType.JPG, True, sq)
1265+
assert rets == daa_list_expect
12551266

12561267
@pytest.mark.parametrize('args',
12571268
(

coverlovin2/test/test_resources/test_process_dirs_1_empty/EMPTY

Whitespace-only changes.

0 commit comments

Comments
 (0)