Skip to content

Commit

Permalink
use pytest (#103)
Browse files Browse the repository at this point in the history
* replace `unittest` with `pytest`

* fix typo

* Fix code style issues with oitnb

* remove unnecessary `as`

* update test fixtures

* update examples + use `pytest-codeblocks`

* directory fixes

* Fix code style issues with oitnb

* update README examples with descriptions

* restore shebangs

* add reference checks to tests

* remove codeblocks for now

* skip first line of `fort.15`

* skip specific lines in `fort.15`

* skip specific lines in `fort.15`

* skip specific lines in `fort.15`

* fix newline discrepancy

* see if tests fail per-version

* enable plotting the timestep of maximum elevation (#101)

* enable plotting of timestep of maximum elevation

Co-authored-by: Keith Roberts <[email protected]>
Co-authored-by: Lint Action <[email protected]>

* add `metControl` namelist

* update message to use XOR set comparison

* add configuration reference files

* Fix code style issues with oitnb

* add `metControl` to reference files

* ensure same number of processors in tests as in reference files

* make set diff ordered

* explicitly set processors

* fix import

* fix `nproc` propagation

* update reference files

* use difflib

* format diff

* Fix code style issues with oitnb

* update reference file

* update reference file

Co-authored-by: Lint Action <[email protected]>
Co-authored-by: Keith Roberts <[email protected]>
Co-authored-by: Keith Roberts <[email protected]>
  • Loading branch information
4 people authored Jun 8, 2021
1 parent 55f6035 commit d8142a2
Show file tree
Hide file tree
Showing 47 changed files with 44,318 additions and 778 deletions.
13 changes: 6 additions & 7 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,17 @@ on: [ push ]

jobs:
tests:
name: Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
name: Python ${{ matrix.python-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
fail-fast: false
matrix:
os: [ ubuntu-latest ]
python-version: [ 3.6, 3.7, 3.8, 3.9 ]
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup Python
- name: Install Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
Expand All @@ -36,9 +37,7 @@ 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: Run tests with coverage
run: coverage run --source adcircpy -m nose --nologcapture --verbose
- name: Generate coverage report
run: coverage report -m
run: pytest --cov=adcircpy --numprocesses auto
- name: Upload coverage to Codecov
if: matrix.python-version == 3.9
uses: codecov/codecov-action@v1
Expand Down
Loading

0 comments on commit d8142a2

Please sign in to comment.