用到了 nodeid,它是一个测试function在pytest中的呈现方式,结构类似于这样 “Test_module.py::Test_class::test_function_1”;还用到了另一个hook,pytest_configure(config)。将这些用例 按照pytest的格式列在某一个配置文件中,修改这个列表就可以实现只跑这些用例。 同样,修改conftest.py 文件: 1 2 3 defpyte...
pytest -k tests_perf testtimer: pytest --durations=10 pytest # another performance test, to check evolution across commits testasv: @@ -116,7 +116,7 @@ pre-commit: # quick sanity checks @make --no-print-directory testsetup flake8 -j 8 --count --statistics setup.py .meta/ tqdm/ ...
cql-pytest's config_value_context is used to run a code sequence with different ScyllaDB configuration applied for a while. When it reads the original value (in order to restore it later), it applies ast.literal_eval() to it. This is strange, since the config variable isn't a Python l...