From 664b215f16113ec4de9a3966af411e4010760943 Mon Sep 17 00:00:00 2001 From: Marcel Nijenhof Date: Mon, 3 Jan 2022 18:32:08 +0100 Subject: [PATCH] Verplaatsen test directory --- .drone.yml | 27 +++++-------------- src/lmwsip/tests/__init__.py => tests/main.py | 4 +-- {src/lmwsip/tests => tests}/stubSipServer.py | 0 tox.ini | 2 +- 4 files changed, 9 insertions(+), 24 deletions(-) rename src/lmwsip/tests/__init__.py => tests/main.py (98%) rename {src/lmwsip/tests => tests}/stubSipServer.py (100%) diff --git a/.drone.yml b/.drone.yml index 31ff458..f275d5f 100644 --- a/.drone.yml +++ b/.drone.yml @@ -10,11 +10,8 @@ platform: steps: - name: Run unit test - environment: - PYTHONPATH: .. commands: - - cd src - - python3 -m unittest -v lmwsip.tests + - python3 tests/main.py --- kind: pipeline @@ -28,11 +25,8 @@ platform: steps: - name: Run unit test - environment: - PYTHONPATH: . commands: - - cd src - - python3 -m unittest -v lmwsip.tests + - python3 tests/main.py --- kind: pipeline @@ -46,11 +40,8 @@ platform: steps: - name: Run unit test - environment: - PYTHONPATH: . commands: - - cd src - - python3 -m unittest -v lmwsip.tests + - python3 tests/main.py --- kind: pipeline @@ -77,12 +68,9 @@ name: docker_python:3.6 steps: - name: Run unit test image: python:3.6 - environment: - PYTHONPATH: . commands: - pip install python-dateutil - - cd src - - python -m unittest -v lmwsip.tests + - tests/main.py --- kind: pipeline @@ -92,13 +80,10 @@ name: docker_python:latest steps: - name: Run unit test image: python:latest - environment: - PYTHONPATH: . commands: - pip install python-dateutil - python --version - - cd src - - python -m unittest -v lmwsip.tests + - python tests/main.py --- kind: pipeline @@ -172,7 +157,7 @@ steps: - > [ $(python -c "import lmwsip; print(lmwsip.__version__)") = $(python setup.py --version) ] - - python -m unittest -v lmwsip.tests + - python tests/main.py when: branch: - master diff --git a/src/lmwsip/tests/__init__.py b/tests/main.py similarity index 98% rename from src/lmwsip/tests/__init__.py rename to tests/main.py index ce89f51..508cfaf 100755 --- a/src/lmwsip/tests/__init__.py +++ b/tests/main.py @@ -4,10 +4,10 @@ import sys import io import unittest import lmwsip -import lmwsip.tests.stubSipServer +import stubSipServer import logging -from lmwsip.tests.stubSipServer import sipServer +from stubSipServer import sipServer from lmwsip.run import run from datetime import datetime, timedelta from dateutil import tz diff --git a/src/lmwsip/tests/stubSipServer.py b/tests/stubSipServer.py similarity index 100% rename from src/lmwsip/tests/stubSipServer.py rename to tests/stubSipServer.py diff --git a/tox.ini b/tox.ini index bd622bb..8fde102 100644 --- a/tox.ini +++ b/tox.ini @@ -3,4 +3,4 @@ envlist = py36,py37,py38,py310 [testenv] deps = python-dateutil -commands = python -m unittest -v lmwsip.tests +commands = python tests/main.py