MCPcopy Create free account
hub / github.com/OpenAstronomy/packaging-guide / test_examples_present

Function test_examples_present

tests/test_hooks.py:21–40  ·  view source on GitHub ↗
(cookiejar_examples)

Source from the content-addressed store, hash-verified

19
20
21def test_examples_present(cookiejar_examples):
22 cj = cookiejar_examples
23 ctx = cj.context
24
25 example_files = [
26 "example_mod.py",
27 "example_subpkg/",
28 "example_subpkg/__init__.py",
29 "example_subpkg/tests/__init__.py",
30 "example_subpkg/data/.gitignore",
31 "tests/",
32 "tests/test_example.py",
33 "tests/__init__.py",
34 ]
35
36 if ctx['use_compiled_extensions'] == 'y':
37 example_files.append("example_c.pyx")
38
39 for afile in example_files:
40 assert (cj.project_path / ctx['package_name'] / afile).exists()
41
42
43@pytest.mark.parametrize("license, lfile", [

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected