1
0
Fork 0
mirror of https://github.com/deltachat/deltachat-core.git synced 2025-10-04 02:09:17 +02:00
deltachat-core/python/tests/conftest.py

23 lines
622 B
Python

import pytest
import deltachat
def pytest_addoption(parser):
parser.addoption("--user", action="store", default=None,
help="user and domain of test account: example user@example.org")
parser.addoption("--password", action="store", default=None)
@pytest.fixture
def userpassword(pytestconfig):
user = pytestconfig.getoption("--user")
passwd = pytestconfig.getoption("--password")
if user and passwd:
return user, passwd
pytest.skip("specify a test account with --user and --password options")
@pytest.fixture
def tmp_db_path(tmpdir):
return tmpdir.join("test.db").strpath