MCPcopy
hub / github.com/commaai/openpilot / test_layouts

Method test_layouts

tools/plotjuggler/test_plotjuggler.py:39–52  ·  view source on GitHub ↗
(self, subtests)

Source from the content-addressed store, hash-verified

37
38 # TODO: also test that layouts successfully load
39 def test_layouts(self, subtests):
40 bad_strings = (
41 # if a previously loaded file is defined,
42 # PJ will throw a warning when loading the layout
43 "fileInfo",
44 "previouslyLoaded_Datafiles",
45 )
46 for fn in glob.glob(os.path.join(PJ_DIR, "layouts/*")):
47 name = os.path.basename(fn)
48 with subtests.test(layout=name):
49 with open(fn) as f:
50 layout = f.read()
51 violations = [s for s in bad_strings if s in layout]
52 assert len(violations) == 0, f"These should be stripped out of the layout: {str(violations)}"

Callers

nothing calls this directly

Calls 2

joinMethod · 0.80
readMethod · 0.45

Tested by

no test coverage detected