Skip to content

Commit

Permalink
make the command line tests into a pytest test
Browse files Browse the repository at this point in the history
  • Loading branch information
nickzoic committed Nov 8, 2023
1 parent ebe38c1 commit 01240cc
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 26 deletions.
17 changes: 6 additions & 11 deletions .github/workflows/run-tests-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,10 @@ jobs:
- run: pip install --upgrade pip
- run: pip install .[dev]
# - run: xvfb-run pytest tests/
- run: tests/cmd_tests.sh

run-tests-ubuntu-22_04-python-3_10-with-coverage:
runs-on: ubuntu-22.04
name: Ubuntu 22.04, Python 3.10
name: Ubuntu 22.04, Python 3.10 (with coverage)
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
Expand All @@ -29,12 +28,11 @@ jobs:
- run: pip install --upgrade pip
- run: pip install .[dev]
- run: xvfb-run coverage run --source countess -m pytest tests/
- run: coverage html
- run: tests/cmd_tests.sh
- uses: actions/upload-artifact@v3
with:
name: test coverage report
path: htmlcov/*
# - run: coverage html
# - uses: actions/upload-artifact@v3
# with:
# name: test coverage report
# path: htmlcov/*
- run: echo '### Coverage Report' >> $GITHUB_STEP_SUMMARY
- run: coverage report --format=markdown >> $GITHUB_STEP_SUMMARY

Expand Down Expand Up @@ -125,7 +123,6 @@ jobs:
- run: python3.11 -m pip install --upgrade pip
- run: python3.11 -m pip install -e .[dev]
- run: xvfb-run python3.11 -mpytest tests/
- run: tests/cmd_tests.sh

# run-tests-ubuntu-22_10-python-3_11_from_apt:
#runs-on: ubuntu-22.10
Expand All @@ -136,7 +133,6 @@ jobs:
#- run: python3.11 -m pip install --upgrade pip
#- run: python3.11 -m pip install -e .[dev]
#- run: xvfb-run python3.11 -mpytest tests/
#- run: tests/cmd_tests.sh

#run-tests-ubuntu-23_04-python-3_11_from_apt:
#runs-on: ubuntu-23.04
Expand All @@ -147,7 +143,6 @@ jobs:
#- run: python3.11 -m pip install --upgrade pip
#- run: python3.11 -m pip install -e .[dev]
#- run: xvfb-run python3.11 -mpytest tests/
#- run: tests/cmd_tests.sh

# run-tests-ubuntu-22_04-pypy3:
# runs-on: ubuntu-22.04
Expand Down
6 changes: 3 additions & 3 deletions countess/core/cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ def process_ini(config_filename):
graph.run(logger)


def main():
for config_filename in sys.argv[1:]:
def main(argv):
for config_filename in argv[1:]:
process_ini(config_filename)


if __name__ == "__main__":
main()
main(sys.argv)
8 changes: 0 additions & 8 deletions tests/cmd_tests.sh

This file was deleted.

4 changes: 0 additions & 4 deletions tests/output.csv.expected

This file was deleted.

0 comments on commit 01240cc

Please sign in to comment.