don't depend on deltachat python package

This commit is contained in:
holger krekel
2023-12-08 12:15:39 +01:00
parent 2b5cdd143e
commit 648174c226
3 changed files with 17 additions and 3 deletions

View File

@@ -3,6 +3,6 @@ set -e
python3 -m venv venv python3 -m venv venv
pip=venv/bin/pip pip=venv/bin/pip
$pip install pyinfra pytest build 'setuptools>=68' tox deltachat $pip install pyinfra pytest build 'setuptools>=68' tox
$pip install -e deploy-chatmail $pip install -e deploy-chatmail
$pip install -e chatmaild $pip install -e chatmaild

View File

@@ -278,13 +278,13 @@ class ChatmailTestProcess:
@pytest.fixture @pytest.fixture
def cmfactory(request, gencreds, tmpdir, data, maildomain): def cmfactory(request, gencreds, tmpdir, maildomain):
# cloned from deltachat.testplugin.amfactory # cloned from deltachat.testplugin.amfactory
pytest.importorskip("deltachat") pytest.importorskip("deltachat")
from deltachat.testplugin import ACFactory from deltachat.testplugin import ACFactory
testproc = ChatmailTestProcess(request.config, maildomain, gencreds) testproc = ChatmailTestProcess(request.config, maildomain, gencreds)
am = ACFactory(request=request, tmpdir=tmpdir, testprocess=testproc, data=data) am = ACFactory(request=request, tmpdir=tmpdir, testprocess=testproc, data=None)
# nb. a bit hacky # nb. a bit hacky
# would probably be better if deltachat's test machinery grows native support # would probably be better if deltachat's test machinery grows native support
@@ -326,6 +326,18 @@ class Remote:
break break
@pytest.fixture
def lp(request):
class LP:
def sec(self, msg):
print(f"---- {msg} ----")
def indent(self, msg):
print(f" {msg}")
return LP()
@pytest.fixture @pytest.fixture
def maildata(request, gencreds): def maildata(request, gencreds):
datadir = conftestdir.joinpath("mail-data") datadir = conftestdir.joinpath("mail-data")

View File

@@ -4,6 +4,7 @@ import importlib.resources
from deploy_chatmail.www import build_webpages from deploy_chatmail.www import build_webpages
from deploy_chatmail import get_ini_settings from deploy_chatmail import get_ini_settings
def create_ini(inipath): def create_ini(inipath):
inipath.write_text( inipath.write_text(
textwrap.dedent( textwrap.dedent(
@@ -22,6 +23,7 @@ def create_ini(inipath):
) )
) )
def test_build_webpages(tmp_path): def test_build_webpages(tmp_path):
pkgroot = importlib.resources.files("deploy_chatmail") pkgroot = importlib.resources.files("deploy_chatmail")
src_dir = pkgroot.joinpath("../../../www/src").resolve() src_dir = pkgroot.joinpath("../../../www/src").resolve()