Closed debboutr closed 4 years ago
Totals | |
---|---|
Change from base Build 272: | 0.007% |
Covered Lines: | 2022 |
Relevant Lines: | 2483 |
Thanks for the PR. To add tests, add a new function to /tests/test_grid.py
that checks the new functionality. The new function will be called automatically by pytest.
You can run tests locally by navigating to the root directory of the repo and running:
pytest
To run tests + coverage check, run:
pytest --cov=pysheds/
For more info, see: https://docs.pytest.org/en/latest/
Note that pushing to your fork will automatically trigger the test on Travis.
Just popped a test in that I think provides some coverage for this feature. Any feedback towards improvement would be appreciated. One thing I noticed when trying to run pytest was that you can't have pyproj
installed from `conda or you will get this error
installing w/ pip did the trick for me though. I got the tests to pass, but not with the --cov
flag, not sure what to do there, sorry. It says unrecognized arguments
, is there another package that I need to do that?
Thanks!
Here's an attempt at adding the functionality of the
nearest_cell
method to allow the user to define another approach to how the pour point geometry will be indexed in the raster. I'd be happy to add a test, but I am unsure of how you are running tests right now. Is there a testing package that you are using? Thanks