Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion tests/test_build_force.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ def test_force_refuses_a_directory_that_is_not_a_study(self):
result = self.runner.invoke(cli, args + ["--output", "mydata", "--force"])

self.assertNotEqual(result.exit_code, 0)
self.assertIn("does not look like a study", result.output)
# Rich wraps long messages at the console width, so ignore line breaks
self.assertIn("does not look like a study", " ".join(result.output.split()))
self.assertTrue((Path("mydata") / "important.txt").exists())

def test_force_refuses_the_current_directory(self):
Expand Down
12 changes: 9 additions & 3 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -1145,16 +1145,22 @@ def test_validate_and_inspect_julia_node(self):
(src_dir / "ctrl.jl").write_text("# julia controller")

# validate passes with no unusual file extension warning
val_res = self.runner.invoke(cli, ["validate", "workflow.graphml", "--format", "json"])
val_res = self.runner.invoke(
cli, ["validate", "workflow.graphml", "--format", "json"]
)
self.assertEqual(val_res.exit_code, 0)
val_payload = json.loads(val_res.output)
self.assertTrue(val_payload["valid"])
self.assertEqual(val_payload["summary"]["error_count"], 0)
warning_messages = [w["message"] for w in val_payload["warnings"]]
self.assertFalse(any("unusual file extension" in m for m in warning_messages))
self.assertFalse(
any("unusual file extension" in m for m in warning_messages)
)

# inspect reports Julia language
insp_res = self.runner.invoke(cli, ["inspect", "workflow.graphml", "--json"])
insp_res = self.runner.invoke(
cli, ["inspect", "workflow.graphml", "--json"]
)
self.assertEqual(insp_res.exit_code, 0)
insp_payload = json.loads(insp_res.output)
self.assertEqual(insp_payload["nodes"]["by_language"].get("julia"), 1)
Expand Down
5 changes: 5 additions & 0 deletions tests/test_demo_workflows_generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@
KNOWN_UNSUPPORTED = {
("sampleJ.graphml", "posix"): "Julia (.jl) nodes in local builds",
("sampleJ.graphml", "windows"): "Julia (.jl) nodes in local builds",
**{
(name, build_type): "node sources pstim.py, pacq.py, simpm.py are not in demo/"
for name in ("generalcontrol.graphml", "generalcontroler.graphml")
for build_type in ("posix", "windows", "docker")
},
}


Expand Down
Loading