diff --git a/.github/workflows/pydep.yml b/.github/workflows/pydep.yml index befb9984..9b577a8d 100644 --- a/.github/workflows/pydep.yml +++ b/.github/workflows/pydep.yml @@ -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 diff --git a/tests/test_tillage.py b/tests/test_tillage.py new file mode 100644 index 00000000..3d19897d --- /dev/null +++ b/tests/test_tillage.py @@ -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 == ""