Skip to content

Commit

Permalink
Add optional testing requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
ronald-jaepel committed Mar 22, 2024
1 parent 023a80f commit 0413610
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ jobs:
- name: Test Wheel install and import
run: |
pip install wheel
which pip
python setup.py bdist_wheel
cd dist
pip install CADET_Python*.whl
Expand All @@ -49,5 +50,6 @@ jobs:
run: |
pip install .[testing]
mamba install cadet
which cadet-cli
mamba list
pytest tests --rootdir=tests -m "not slow"
7 changes: 5 additions & 2 deletions tests/test_SMB.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ def gen_connections(units, cycle_size, size, step, flows, flows_static):
idx = 0
for io in ios[:2]:
temp.append([io[0], io[1], -1, -1, flows_static[idx]])
idx += 1;
idx += 1
# outputs
for io in ios[2:]:
temp.append([io[1], io[0], -1, -1, flows_static[idx]])
idx += 1;
idx += 1
return numpy.array(temp)


Expand Down Expand Up @@ -243,7 +243,10 @@ def plotSimulation(simulation):

@pytest.mark.slow
def test_SMB():
from datetime import datetime
start = datetime.now()
sim = main()
print(datetime.now() - start)
assert isinstance(sim.root.output.solution.unit_003.solution_outlet_comp_001, numpy.ndarray)
assert isinstance(sim.root.output.solution.unit_003.solution_outlet_comp_000, numpy.ndarray)

Expand Down

0 comments on commit 0413610

Please sign in to comment.