Skip to content

Commit

Permalink
test: cover tillage
Browse files Browse the repository at this point in the history
  • Loading branch information
akrherz committed Apr 2, 2024
1 parent 4ac2647 commit f99643f
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/pydep.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ jobs:
run: |
cat .github/workflows/etchosts.txt | sudo tee -a /etc/hosts
# daryl is a hack
- name: Create symlink
run: |
set -e
sudo ln -s `pwd` /opt/dep
# setup conda-forge with micromamba
- name: Setup Python
uses: mamba-org/setup-micromamba@v1
Expand Down
25 changes: 25 additions & 0 deletions tests/test_tillage.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
"""Test pydep.tillage."""

from pydep import tillage


def test_simple():
"""Test import of API."""
plants = ["C", "B", "W", "P"]
cfactors = list(range(1, 7))
zones = ["IA_NORTH", "IA_SOUTH", "KS_NORTH"]
for bp in plants:
for pp in plants:
for ap in plants:
for cfactor in cfactors:
for zone in zones:
res = tillage.make_tillage(
0, zone, bp, pp, ap, cfactor, 1
)
assert res is not None


def test_unknown_file():
"""Test unknown file."""
res = tillage.make_tillage(0, "IA_NORTH", "q", "q", "q", 1, 1)
assert res == ""

0 comments on commit f99643f

Please sign in to comment.