We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d3a9fce commit b0953d3Copy full SHA for b0953d3
tests/test_wrapper.py
@@ -0,0 +1,17 @@
1
+"""Test the parts of the wrapper function."""
2
+
3
+import glob
4
+import os.path
5
6
+from check_python_h_first.wrapper import sort_order
7
8
+THIS_DIR = os.path.dirname(__file__)
9
10
+HEADER_LIST = glob.glob(os.path.join(THIS_DIR, "*.h"))
11
+SOURCE_LIST = glob.glob(os.path.join(THIS_DIR, "*.c"))
12
13
14
+def test_sort_order():
15
+ """Test that the sort function puts headers first."""
16
+ result = sorted(SOURCE_LIST + HEADER_LIST, key=sort_order)
17
+ assert result == HEADER_LIST + SOURCE_LIST
0 commit comments