[GRASS-dev] [GRASS GIS] #3792: Use unique names on test modules
GRASS GIS
trac at osgeo.org
Tue Mar 12 10:07:18 PDT 2019
#3792: Use unique names on test modules
-------------------------+-------------------------
Reporter: pmav99 | Owner: grass-dev@…
Type: enhancement | Status: new
Priority: normal | Milestone:
Component: Default | Version: svn-trunk
Keywords: | CPU: Unspecified
Platform: Unspecified |
-------------------------+-------------------------
I am experimenting a bit with running GRASS tests using pytest. If this
works out, we should be able to e.g. easily get reports on
[https://lists.osgeo.org/pipermail/grass-dev/2019-March/091482.html test
coverage].
One of the requirements for using pytest is to have
[https://docs.pytest.org/en/latest/goodpractices.html#test-discovery
uniquely named test modules]. The grass testsuite does have some
duplicates filenames though. Regardless of pytest, I think that having
unique names is a good idea anyway.
The following commands removes duplicate filenames and thus allow pytest
to run:
{{{
svn mv lib/python/gunittest/testsuite/test_doctests.py
lib/python/gunittest/testsuite/test_gunnitest_doctests.py
svn mv lib/python/pygrass/gis/testsuite/test_doctests.py
lib/python/pygrass/gis/testsuite/test_pygrass_gis_doctests.py
svn mv lib/python/pygrass/messages/testsuite/test_doctests.py
lib/python/pygrass/messages/testsuite/test_pygrass_messages_doctests.py
svn mv lib/python/pygrass/modules/grid/testsuite/test_doctests.py
lib/python/pygrass/modules/grid/testsuite/test_pygrass_modules_grid_doctests.py
svn mv lib/python/pygrass/modules/interface/testsuite/test_doctests.py
lib/python/pygrass/modules/interface/testsuite/test_pygrass_modules_interface_doctests.py
svn mv lib/python/pygrass/modules/testsuite/test_doctests.py
lib/python/pygrass/modules/testsuite/test_pygrass_modules_doctests.py
svn mv lib/python/pygrass/raster/testsuite/test_doctests.py
lib/python/pygrass/raster/testsuite/test_pygrass_raster_doctests.py
svn mv lib/python/pygrass/raster/testsuite/test_raster.py
lib/python/pygrass/raster/testsuite/test_pygrass_raster.py
svn mv lib/python/pygrass/rpc/testsuite/test_doctests.py
lib/python/pygrass/rpc/testsuite/test_pygrass_rpc_doctests.py
svn mv lib/python/pygrass/shell/testsuite/test_doctests.py
lib/python/pygrass/shell/testsuite/test_pygrass_shell_doctests.py
svn mv lib/python/pygrass/testsuite/test_doctests.py
lib/python/pygrass/testsuite/test_pygrass_doctests.py
svn mv lib/python/pygrass/vector/testsuite/test_doctests.py
lib/python/pygrass/vector/testsuite/test_pygrass_vector_doctests.py
svn mv lib/python/script/testsuite/test_doctests.py
lib/python/script/testsuite/test_script_doctests.py
svn mv lib/python/script/testsuite/test_raster.py
lib/python/script/testsuite/test_script_raster.py
svn mv lib/python/temporal/testsuite/test_doctests.py
lib/python/temporal/testsuite/test_temporal_doctests.py
svn mv temporal/t.rast.extract/testsuite/test_extract.py
temporal/t.rast.extract/testsuite/test_t_rast_extract.py
svn mv temporal/t.rast.univar/testsuite/test_univar.py
temporal/t.rast.univar/testsuite/test_t_rast_univar.py
svn mv temporal/t.rast3d.extract/testsuite/test_extract.py
temporal/t.rast3d.extract/testsuite/test_t_rast3d_extract.py
svn mv temporal/t.rast3d.univar/testsuite/test_univar.py
temporal/t.rast3d.univar/testsuite/test_t_rast3d_univar.py
svn mv vector/v.extract/testsuite/test_extract.py
vector/v.extract/testsuite/test_v_extract.py
svn mv vector/v.in.lidar/testsuite/basic_test.py
vector/v.in.lidar/testsuite/test_v_in_lidar_basic.py
svn mv vector/v.in.lidar/testsuite/filter_test.py
vector/v.in.lidar/testsuite/test_v_in_lidar_filter.py
svn mv vector/v.in.pdal/testsuite/basic_test.py
vector/v.in.lidar/testsuite/test_v_in_pdal_basic.py
svn mv vector/v.in.pdal/testsuite/filter_test.py
vector/v.in.lidar/testsuite/test_v_in_pdal_filter.py
}}}
After applying, pytest is able
[https://gist.github.com/pmav99/6a9f92ad3fbb0ef8d1fb8d71cb922af4 to
collect] python based tests.
Unless they are any specific objections, I would appreciate if this was
applied.
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3792>
GRASS GIS <https://grass.osgeo.org>
More information about the grass-dev
mailing list