#3792 closed enhancement (fixed)
Use unique names on test modules
Reported by: | pmav99 | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | 7.8.0 |
Component: | Tests | Version: | svn-trunk |
Keywords: | Cc: | ||
CPU: | Unspecified | Platform: | Unspecified |
Description
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 test coverage.
One of the requirements for using pytest is to have 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 to collect python based tests.
Unless they are any specific objections, I would appreciate if this was applied.
Change History (6)
comment:1 by , 6 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 by , 6 years ago
Component: | Default → Tests |
---|---|
Milestone: | → 7.8.0 |
comment:3 by , 6 years ago
As shown by @sbl here, there was a typo. To fix it the following needs to be applied:
svn mv vector/v.in.lidar/testsuite/test_v_in_pdal_basic.py vector/v.in.pdal/testsuite/test_v_in_pdal_basic.py svn mv vector/v.in.lidar/testsuite/test_v_in_pdal_filter.py vector/v.in.pdal/testsuite/test_v_in_pdal_filter.py
comment:5 by , 6 years ago
If possible, please convert the following test to a proper python module name:
raster/r.random/testsuite/test_r.random.py
I guess that this should do it:
svn mv raster/r.random/testsuite/test_r.random.py raster/r.random/testsuite/test_r_random.py
In 74226: