pytest
to run the test suite. This should do it:cd autotest
pip install -r ./requirements.txt
pytest
# get more verbose output; don't capture stdout/stdin
pytest -vvs
# run all the gcore tests
pytest gcore/
# run a particular module only
pytest gcore/basic_test.py
# run a particular test case in a module
pytest gcore/basic_test.py::test_basic_test_1
Full documentation of pytest at https://docs.pytest.org/en/latest/
GDAL's test functions are not currently independent of each other. In particular, running individual test functions from a given module may not work. Most tests were originally written with the assumption that entire modules will be run at once.
Practically, this means that you should avoid using:
--last-failed
/ --lf
option (since it runs only failed tests, not the whole module)pytest gcore/basic_test.py::test_basic_test_1
)--dist=loadfile
. (This may have other issues; untested)This will hopefully be addressed in the future. When writing new tests, please try to make them independent of each other.
The GDAL Team makes every effort to assure that all sample data files available from GDAL download server (http://download.osgeo.org/gdal/data/) and test data files used in GDAL Autotest package (https://github.com/OSGeo/gdal/tree/master/autotest) are available as public and freely redistributable geodata.
--
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。