| 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)}" |