MCPcopy Create free account
hub / github.com/PerpetualSoftware/pad / test_paths

Method test_paths

scripts/ci-scope_test.py:17–36  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

15
16class ScopeTest(unittest.TestCase):
17 def test_paths(self):
18 for path, want in [
19 ('web/static/a', (False, True, False, True)),
20 ('web/src/a.ts', (False, True, False, True)),
21 ('internal/store/a.go', (True, True, False, False)),
22 ('go.mod', (True, True, True, False)),
23 ('go.sum', (True, True, True, False)),
24 ('.github/workflows/new.yml', (True, True, True, True)),
25 ('scripts/ci-web-parity.txt', (True, True, True, True)),
26 ('scripts/ci-web-census/main.go', (True, True, True, True)),
27 ('README.md', (True, True, False, False)),
28 ('nix/package.nix', (True, True, True, False)),
29 ('flake.lock', (True, True, True, False)),
30 ('web/package-lock.json', (False, True, True, True)),
31 ('web/package.json', (False, True, True, True)),
32 ('web/file with spaces\nand newline', (False, True, False, True)),
33 ]:
34 with self.subTest(path=path):
35 got = scope.classify([path])
36 self.assertEqual(tuple(got[k] for k in ('go', 'web', 'nix', 'parity')), want)
37
38 def test_local_dependency_guard(self):
39 cases = [

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected