-
-
Notifications
You must be signed in to change notification settings - Fork 311
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: Revise content of the root testsuite dir (#4516)
* Remove Makefiles. * Move the functioning test to the testsuite directory for the gunittest to pick it up. * Remove the extended example how to run gunittest. Point to the CI in the README instead. * Remove hemisphere generator because it does not test anything by itself (without further processing and a human). * Remove GPS import tests as the tools are not in core. * Remove division into subdirectories. The directories with the code should be used instead. * Improve the test for gunittest loader function with some duplication but now creating an overview of .py and .sh tests.
- Loading branch information
1 parent
1adbd2c
commit 9a79aa4
Showing
10 changed files
with
42 additions
and
277 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,39 @@ | ||
# Test suite | ||
|
||
This directory contains scripts to check some functionality of GRASS GIS. | ||
Tests are in directories `tests` and `testsuite` under each directory which has tests. | ||
This directory contains additional scripts and information to test functionality | ||
without a focus on a specific part of the code. | ||
|
||
GRASS GIS testsuite documentation: <https://grass.osgeo.org/grass-devel/manuals/libpython/gunittest_testing.html> | ||
There are two testing mechanism in place, _pytest_ which is the modern way of testing | ||
GRASS GIS. Tests using _pytest_ are written just as any other Python tests. | ||
|
||
## Simple test data | ||
In parallel, there is also custom unittest-based framework centered around | ||
_grass.gunittest_ package. These tests run in the NC sample datasets and can be | ||
executed using _pytest_ or directly. The unittest-based adds a number of custom | ||
assert methods to accommodate different data and outputs typical in GRASS GIS. | ||
_grass.gunittest_ documentation: | ||
<https://grass.osgeo.org/grass-devel/manuals/libpython/gunittest_testing.html> | ||
|
||
Some tests may be launched in the location `../demolocation/`: | ||
## Running tests | ||
|
||
Tests can be executed using _pytest_: | ||
|
||
```bash | ||
# create new mapset for test | ||
grass ../demolocation/user1 -c | ||
# run the test | ||
make | ||
# Setup the Python environment (if not set up already). | ||
# Replace grass by path to the executable if not installed on path. | ||
export PYTHONPATH=\$(grass --config python_path):\$PYTHONPATH | ||
export LD_LIBRARY_PATH=\$(grass --config path)/lib:\$LD_LIBRARY_PATH | ||
# Run the test. | ||
pytest | ||
``` | ||
|
||
## Extended test data | ||
|
||
Most tests require the North Carolina Sample dataset, available from | ||
<https://grass.osgeo.org/sampledata/north_carolina/> | ||
## Test data | ||
|
||
## Notes | ||
To test manually or to write tests, you may need to use the North Carolina | ||
Sample dataset, available from | ||
<https://grass.osgeo.org/sampledata/north_carolina/>. | ||
|
||
Since 2020: For a more advanced test suite, see | ||
<https://github.com/OSGeo/grass/actions> | ||
## CI | ||
|
||
Until 2019: For a more advanced test suite, see | ||
<http://fatra.cnr.ncsu.edu/grassgistests/summary_report/> | ||
Most tests run in the CI. See the `.github` directory for details and | ||
use it as a reference. |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file was deleted.
Oops, something went wrong.