Skip to content

Commit 1d630a0

Browse files
committed
TST: Add test for the file finder
1 parent b0953d3 commit 1d630a0

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

tests/test_wrapper.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import glob
44
import os.path
55

6-
from check_python_h_first.wrapper import sort_order
6+
from check_python_h_first.wrapper import find_c_cpp_files, sort_order
77

88
THIS_DIR = os.path.dirname(__file__)
99

@@ -15,3 +15,9 @@ def test_sort_order():
1515
"""Test that the sort function puts headers first."""
1616
result = sorted(SOURCE_LIST + HEADER_LIST, key=sort_order)
1717
assert result == HEADER_LIST + SOURCE_LIST
18+
19+
20+
def test_find_c_cpp_files():
21+
"""Test that the function can find all the files."""
22+
result = find_c_cpp_files(THIS_DIR)
23+
assert set(result) == set(HEADER_LIST + SOURCE_LIST)

0 commit comments

Comments
 (0)