Skip to content

Commit

Permalink
Fixed and added testing
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeByDrescher committed Sep 19, 2024
1 parent 963b0a3 commit 44e48c6
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
15 changes: 15 additions & 0 deletions tests/test_case/test_published_project.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import pytest

from biosimulators_test_suite import data_model
from biosimulators_test_suite.exceptions import InvalidOutputsException, SkippedTestCaseException
from biosimulators_test_suite.results.data_model import TestCaseResult, TestCaseResultType
Expand Down Expand Up @@ -58,6 +60,19 @@ def test_find_cases(self):
self.assertEqual(len(all_cases), 0)
self.assertEqual(len(compatible_cases), 0)

### TEMPORARY RBA REMOVAL, REMOVE THIS NEXT SECTION IF RESTORED
with pytest.raises(RuntimeError):
all_cases, _ = find_cases({
'algorithms': [
{
'id': "rba",
'kisaoId': {'id': 'KISAO_0000669'},
'modelFormats': [{'id': 'format_2585', 'supportedFeatures': []}],
}
]
})


def test_SimulatorCanExecutePublishedProject_description(self):
case = SimulatorCanExecutePublishedProject(task_requirements=[
data_model.SedTaskRequirements(model_format='format_2585', simulation_algorithm='KISAO_0000027'),
Expand Down
9 changes: 5 additions & 4 deletions tests/test_examples.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import pytest
from biosimulators_utils.combine.io import CombineArchiveReader
from biosimulators_utils.combine.data_model import CombineArchiveContentFormat
from biosimulators_utils.combine.utils import get_sedml_contents
Expand Down Expand Up @@ -37,10 +38,10 @@ def tearDown(self):
shutil.rmtree(self.dirname)

@parameterized.parameterized.expand(EXAMPLES)
def test_example(self, name, example_filename):
### TEMPORARY RBA REMOVAL
if "rba" in example_filename:
return
def test_example_should_pass(self, name, example_filename):
self.run_test_example(name, example_filename)

def run_test_example(self, name, example_filename):
example_specs_filename = os.path.join(example_filename[0:-5], 'expected-results.json')

example_base_dir = os.path.join(os.path.dirname(example_filename))
Expand Down

0 comments on commit 44e48c6

Please sign in to comment.