Skip to content

Commit

Permalink
Add test for pulling
Browse files Browse the repository at this point in the history
  • Loading branch information
kghose committed Sep 17, 2020
1 parent f9a2cea commit 9ef7a18
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ jobs:
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
env:
SB_AUTH_TOKEN: ${{ secrets.API_KEY }}
SB_API_ENDPOINT: https://api.sbgenomics.com/v2
run: |
pip install pytest
cd tests
Expand Down
13 changes: 13 additions & 0 deletions tests/test_pulling.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import subprocess
import pathlib
import tempfile


def test_pull():

with tempfile.TemporaryDirectory() as td:
out_dir = pathlib.Path(td)
subprocess.run(["sbpull", "--unpack", ".", "admin/sbg-public-data/eqtl-analysis-with-fastqtl-gtex-v7/", str(out_dir / "eqtl.cwl")], check=True)

assert (out_dir / "eqtl.cwl").exists()
assert (out_dir / "eqtl.cwl.steps").exists()

0 comments on commit 9ef7a18

Please sign in to comment.