From: Tobias Brunner Date: Tue, 14 Jan 2020 13:58:01 +0000 (+0100) Subject: vici: Move Python test dir and include it in sdist X-Git-Tag: 5.8.3dr1~67^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ecf161e517efce53493ef4ce341cef0f3ad6b24d;p=thirdparty%2Fstrongswan.git vici: Move Python test dir and include it in sdist This is the recommended location and import config as it allows running the tests against installed versions of the package. And while the test file itself is automatically included in the source distribution this way, the __init__.py file is not, so we still have to update MANIFEST.in. --- diff --git a/src/libcharon/plugins/vici/python/MANIFEST.in b/src/libcharon/plugins/vici/python/MANIFEST.in index 9d5d250d09..883ea5d521 100644 --- a/src/libcharon/plugins/vici/python/MANIFEST.in +++ b/src/libcharon/plugins/vici/python/MANIFEST.in @@ -1,2 +1,4 @@ include LICENSE include README.rst +include tox.ini +recursive-include test *.py diff --git a/src/libcharon/plugins/vici/python/Makefile.am b/src/libcharon/plugins/vici/python/Makefile.am index 8a9e6fc263..a2e7596e48 100644 --- a/src/libcharon/plugins/vici/python/Makefile.am +++ b/src/libcharon/plugins/vici/python/Makefile.am @@ -2,8 +2,8 @@ EXTRA_DIST = LICENSE README.rst MANIFEST.in \ setup.py.in \ tox.ini \ tox.sh \ - vici/test/__init__.py \ - vici/test/test_protocol.py \ + test/__init__.py \ + test/test_protocol.py \ vici/__init__.py \ vici/command_wrappers.py \ vici/compat.py \ diff --git a/src/libcharon/plugins/vici/python/vici/test/__init__.py b/src/libcharon/plugins/vici/python/test/__init__.py similarity index 100% rename from src/libcharon/plugins/vici/python/vici/test/__init__.py rename to src/libcharon/plugins/vici/python/test/__init__.py diff --git a/src/libcharon/plugins/vici/python/vici/test/test_protocol.py b/src/libcharon/plugins/vici/python/test/test_protocol.py similarity index 98% rename from src/libcharon/plugins/vici/python/vici/test/test_protocol.py rename to src/libcharon/plugins/vici/python/test/test_protocol.py index 7ae1f2f905..1924884a11 100644 --- a/src/libcharon/plugins/vici/python/vici/test/test_protocol.py +++ b/src/libcharon/plugins/vici/python/test/test_protocol.py @@ -1,7 +1,7 @@ import pytest -from ..protocol import Packet, Message, FiniteStream -from ..exception import DeserializationException +from vici.protocol import Packet, Message, FiniteStream +from vici.exception import DeserializationException class TestPacket(object):