Skip to content

Commit

Permalink
Merge branch 'develop' into feature/evagram_input_testing
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonzhu09 authored Jun 18, 2024
2 parents 1a16989 + 9a202e3 commit d83baa5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test_evagram_input.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- name: Install Evagram Input Module
run: |
python -m pip install --upgrade pip
pip install evagram_input@git+https://github.com/GEOS-ESM/evagram_input@feature/pgpass_ci --upgrade
pip install evagram_input@git+https://github.com/GEOS-ESM/evagram_input --upgrade
- name: Install Dependencies
run: pip install . -r requirements.txt
Expand Down
17 changes: 5 additions & 12 deletions src/evagram/website/backend/input_app/test_input_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
class TestEvagramInputTool(TestCase):
@classmethod
def setUpTestData(cls):
input_data(owner="postgres",
experiment="experiment1",
eva_directory="tests/eva")
input_data(owner="postgres", experiment="experiment1", eva_directory="tests/eva")

def test_OwnerInSession(self):
queryset = Owners.objects.filter(username="postgres")
Expand All @@ -21,21 +19,16 @@ def test_ExperimentInSession(self):

def test_WrongRootOwner(self):
with self.assertRaises(Exception):
input_data(owner="test",
experiment="experiment1",
eva_directory="tests/eva")
input_data(owner="test", experiment="experiment1", eva_directory="tests/eva")

def test_ExperimentPathNotFound(self):
with self.assertRaises(FileNotFoundError):
input_data(owner="postgres",
experiment="experiment1",
eva_directory="not/a/path")
input_data(owner="postgres", experiment="experiment1", eva_directory="not/a/path")

def test_RollbackOnException(self):
with self.assertRaises(Exception):
input_data(owner="postgres",
experiment="bad_experiment",
eva_directory="tests/dummy")
input_data(
owner="postgres", experiment="bad_experiment", eva_directory="tests/dummy")

owner = Owners.objects.get(username="postgres")
experiments = Experiments.objects.filter(experiment_name="bad_experiment", owner=owner)
Expand Down

0 comments on commit d83baa5

Please sign in to comment.