Skip to content

Commit

Permalink
update test to better version, also py3.13 compat
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-c committed Sep 8, 2024
1 parent cb1c379 commit 14191d3
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions tests/test_examples.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# SPDX-License-Identifier: Apache-2.0
"""Tests of example Python scripts."""
import os
import runpy
from pathlib import Path


Expand All @@ -9,11 +10,7 @@ def test_load_example() -> None:
cwd = Path.cwd()
parent = Path(__file__).resolve().parent
os.chdir(parent.parent)
exec(
open(parent / "load_cwl_by_path.py").read(),
globals(),
locals(),
)
result_raw = runpy.run_path(str(parent / "load_cwl_by_path.py"))
os.chdir(cwd)
result = locals()["saved_obj"]
result = result_raw["saved_obj"]
assert result["class"] == "Workflow"

0 comments on commit 14191d3

Please sign in to comment.