Skip to content

Commit 5c1eba6

Browse files
committed
Don't test xml examples on py3.7
1 parent af43a93 commit 5c1eba6

File tree

2 files changed

+16
-6
lines changed

2 files changed

+16
-6
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,21 +47,28 @@ jobs:
4747
run: |
4848
pip list
4949
50-
- name: Run some examples
50+
- name: Run simple examples
5151
run: |
5252
cd examples
5353
python document.py
5454
5555
cd test
5656
python test.py
5757
58-
## Test NeuroML example
58+
- name: Test NeuroML examples
59+
if: ${{ matrix.python-version != '3.7'}}
5960

60-
cd ../neuroml2
61+
cd examples/neuroml2
6162
python neuroml2_spec.py
6263

6364
# Note: NeuroML files will be validated with OMV below
6465

66+
- name: Test SBML examples
67+
if: ${{ matrix.python-version != '3.7'}}
68+
69+
cd examples/sbml
70+
./regenerateAndTest.sh
71+
6572
- name: Run pytest
6673
run: |
6774
pytest tests

examples/test/test.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@
33
from modelspec.base_types import Base
44
from modelspec.utils import load_json
55
from typing import List
6+
from typing import Any
7+
import sys
68

7-
# Example testing multiple options...
89

9-
from typing import Any
10+
# Example testing multiple options...
1011

1112

1213
def convert2float(x: Any) -> float:
@@ -83,7 +84,9 @@ class TopClass(Base):
8384

8485
tc.to_yaml_file("test_instance.yaml")
8586
tc.to_json_file("test_instance.json")
86-
tc.to_xml_file("test_instance.xml")
87+
88+
if sys.version_info >= (3, 8):
89+
tc.to_xml_file("test_instance.xml")
8790

8891
str_b4 = str(tc)
8992

0 commit comments

Comments
 (0)