MCPcopy Create free account
hub / github.com/datapane/datapane / dp_setup

Function dp_setup

python-client/tests/conftest.py:16–34  ·  view source on GitHub ↗

Set up the common environment and clean default config for each test. Skip optional init tasks with:: @pytest.mark.skip_init When writing fixtures which need to change the config (eg dp_login) see docs: https://docs.pytest.org/en/stable/reference/fixtures.html#fixture-ins

(request, monkeypatch, tmp_path)

Source from the content-addressed store, hash-verified

14
15@pytest.fixture(autouse=True)
16def dp_setup(request, monkeypatch, tmp_path):
17 """
18 Set up the common environment and clean default config for each test.
19
20 Skip optional init tasks with::
21
22 @pytest.mark.skip_init
23
24 When writing fixtures which need to change the config (eg dp_login) see docs:
25 https://docs.pytest.org/en/stable/reference/fixtures.html#fixture-instantiation-order
26 """
27
28 # Init API with full debug logging
29 set_dp_mode(DPMode.SCRIPT)
30 _setup_dp_logging(verbosity=2)
31
32 # Optional init steps
33 if "skip_dp_init" not in request.keywords:
34 config.init()

Callers

nothing calls this directly

Calls 2

set_dp_modeFunction · 0.90
_setup_dp_loggingFunction · 0.90

Tested by

no test coverage detected