gws.test.test¶
Test configurator and invoker.
This script runs on the host machine.
Its purpose is to create a docker compose file, start the compose
and invoke the test runner inside the GWS container (via gws test).
Source code: gws.test.test
Module Contents¶
- gws.test.test.configure()¶
- gws.test.test.dedent(text)¶
- gws.test.test.docker_compose_start(with_exec=False)¶
- gws.test.test.docker_compose_stop()¶
- gws.test.test.docker_exec(container, cmd)¶
- gws.test.test.ensure_dir(path, clear=False)¶
- gws.test.test.LOCAL_APP_DIR = b'.'¶
- gws.test.test.main(args)¶
- gws.test.test.make_coverage_ini()¶
- gws.test.test.make_docker_compose_yml()¶
- gws.test.test.make_env()¶
- gws.test.test.make_pg_service_conf()¶
- gws.test.test.make_pytest_ini()¶
- gws.test.test.OPTIONS¶
- gws.test.test.read_file(path)¶
- gws.test.test.run()¶
- gws.test.test.service_gws()¶
- gws.test.test.service_mockserver()¶
- gws.test.test.service_postgres()¶
- gws.test.test.service_qgis()¶
- gws.test.test.USAGE = Multiline-String¶
Show Value
""" GWS test runner ~~~~~~~~~~~~~~~ python3 test.py <command> <options> - <pytest options> Commands: test.py go - start the test environment, run tests and stop test.py start - start the compose test environment test.py stop - stop the compose test environment test.py run - run tests in a started environment Options: --ini <path> - path to the local 'ini' file (can also be passed in the GWS_TEST_INI env var) --manifest <manifest> - path to MANIFEST.json -c, --coverage - produce a coverage report -d, --detach - run docker compose in the background -l, --local - mount the local copy of the application in the test container -o, --only <regex> - only run filenames matching the pattern -v, --verbose - enable debug logging Pytest options: See https://docs.pytest.org/latest/reference.html#command-line-flags """
- gws.test.test.write_exec(path, s)¶
- gws.test.test.write_file(path, s)¶