From 6f7ad8a6e6baea1a8b5c27a39d499be3894efd9f Mon Sep 17 00:00:00 2001 From: vtexier <vit@free.fr> Date: Wed, 19 Jun 2019 18:37:43 +0200 Subject: [PATCH] [fix] #98 fix tests folder included and installed with duniterpy package tests folder moved in duniterpy folder setup.py fixed --- Makefile | 4 ---- {tests => duniterpy/tests}/__init__.py | 0 {tests => duniterpy/tests}/api/__init__.py | 0 {tests => duniterpy/tests}/api/bma/__init__.py | 0 {tests => duniterpy/tests}/api/bma/test_blockchain.py | 2 +- {tests => duniterpy/tests}/api/bma/test_bma.py | 0 {tests => duniterpy/tests}/api/bma/test_network.py | 2 +- {tests => duniterpy/tests}/api/bma/test_tx.py | 2 +- {tests => duniterpy/tests}/api/bma/test_wot.py | 2 +- {tests => duniterpy/tests}/api/bma/test_ws.py | 2 +- {tests => duniterpy/tests}/api/webserver.py | 0 {tests => duniterpy/tests}/documents/__init__.py | 0 {tests => duniterpy/tests}/documents/test_block.py | 0 {tests => duniterpy/tests}/documents/test_certification.py | 0 {tests => duniterpy/tests}/documents/test_crc_pubkey.py | 0 {tests => duniterpy/tests}/documents/test_membership.py | 0 {tests => duniterpy/tests}/documents/test_peer.py | 0 {tests => duniterpy/tests}/documents/test_transaction.py | 0 {tests => duniterpy/tests}/documents/test_ws2p_heads.py | 0 {tests => duniterpy/tests}/grammars/__init__.py | 0 {tests => duniterpy/tests}/grammars/test_output.py | 0 {tests => duniterpy/tests}/key/__init__.py | 0 {tests => duniterpy/tests}/key/test_ascii_armor.py | 0 {tests => duniterpy/tests}/key/test_encryption_key.py | 0 {tests => duniterpy/tests}/key/test_public_key.py | 0 {tests => duniterpy/tests}/key/test_signing_key.py | 0 {tests => duniterpy/tests}/key/test_verifying_key.py | 0 setup.py | 4 ++-- 28 files changed, 7 insertions(+), 11 deletions(-) rename {tests => duniterpy/tests}/__init__.py (100%) rename {tests => duniterpy/tests}/api/__init__.py (100%) rename {tests => duniterpy/tests}/api/bma/__init__.py (100%) rename {tests => duniterpy/tests}/api/bma/test_blockchain.py (99%) rename {tests => duniterpy/tests}/api/bma/test_bma.py (100%) rename {tests => duniterpy/tests}/api/bma/test_network.py (98%) rename {tests => duniterpy/tests}/api/bma/test_tx.py (99%) rename {tests => duniterpy/tests}/api/bma/test_wot.py (99%) rename {tests => duniterpy/tests}/api/bma/test_ws.py (98%) rename {tests => duniterpy/tests}/api/webserver.py (100%) rename {tests => duniterpy/tests}/documents/__init__.py (100%) rename {tests => duniterpy/tests}/documents/test_block.py (100%) rename {tests => duniterpy/tests}/documents/test_certification.py (100%) rename {tests => duniterpy/tests}/documents/test_crc_pubkey.py (100%) rename {tests => duniterpy/tests}/documents/test_membership.py (100%) rename {tests => duniterpy/tests}/documents/test_peer.py (100%) rename {tests => duniterpy/tests}/documents/test_transaction.py (100%) rename {tests => duniterpy/tests}/documents/test_ws2p_heads.py (100%) rename {tests => duniterpy/tests}/grammars/__init__.py (100%) rename {tests => duniterpy/tests}/grammars/test_output.py (100%) rename {tests => duniterpy/tests}/key/__init__.py (100%) rename {tests => duniterpy/tests}/key/test_ascii_armor.py (100%) rename {tests => duniterpy/tests}/key/test_encryption_key.py (100%) rename {tests => duniterpy/tests}/key/test_public_key.py (100%) rename {tests => duniterpy/tests}/key/test_signing_key.py (100%) rename {tests => duniterpy/tests}/key/test_verifying_key.py (100%) diff --git a/Makefile b/Makefile index f06e95ba..5de03c5a 100644 --- a/Makefile +++ b/Makefile @@ -15,25 +15,21 @@ check: mypy pylint check-format # check static typing mypy: python3 -m mypy duniterpy --ignore-missing-imports - python3 -m mypy tests --ignore-missing-imports python3 -m mypy examples --ignore-missing-imports # check code errors pylint: pylint --disable=C,R0902,R0903,R0904,R0912,R0913,R0914,R0915,W0613 --enable=C0121,C0202,C0321 --jobs=0 duniterpy/ - pylint --disable=C,R0902,R0903,R0904,R0912,R0913,R0914,R0915,W0613 --enable=C0121,C0202,C0321 --jobs=0 tests/ pylint --disable=C,R0902,R0903,R0904,R0912,R0913,R0914,R0915,W0613 --enable=C0121,C0202,C0321 --jobs=0 examples/ # check format check-format: black --check duniterpy - black --check tests black --check examples # format code format: black duniterpy - black tests black examples # build a wheel package in dist folder diff --git a/tests/__init__.py b/duniterpy/tests/__init__.py similarity index 100% rename from tests/__init__.py rename to duniterpy/tests/__init__.py diff --git a/tests/api/__init__.py b/duniterpy/tests/api/__init__.py similarity index 100% rename from tests/api/__init__.py rename to duniterpy/tests/api/__init__.py diff --git a/tests/api/bma/__init__.py b/duniterpy/tests/api/bma/__init__.py similarity index 100% rename from tests/api/bma/__init__.py rename to duniterpy/tests/api/bma/__init__.py diff --git a/tests/api/bma/test_blockchain.py b/duniterpy/tests/api/bma/test_blockchain.py similarity index 99% rename from tests/api/bma/test_blockchain.py rename to duniterpy/tests/api/bma/test_blockchain.py index fd5b258b..6409a0d5 100644 --- a/tests/api/bma/test_blockchain.py +++ b/duniterpy/tests/api/bma/test_blockchain.py @@ -25,7 +25,7 @@ from duniterpy.api.bma.blockchain import ( ) from duniterpy.api.client import Client from duniterpy.api.endpoint import BMAEndpoint -from tests.api.webserver import WebFunctionalSetupMixin, web +from duniterpy.tests.api.webserver import WebFunctionalSetupMixin, web class TestBmaBlockchain(WebFunctionalSetupMixin, unittest.TestCase): diff --git a/tests/api/bma/test_bma.py b/duniterpy/tests/api/bma/test_bma.py similarity index 100% rename from tests/api/bma/test_bma.py rename to duniterpy/tests/api/bma/test_bma.py diff --git a/tests/api/bma/test_network.py b/duniterpy/tests/api/bma/test_network.py similarity index 98% rename from tests/api/bma/test_network.py rename to duniterpy/tests/api/bma/test_network.py index c803d720..3a3d5ee6 100644 --- a/tests/api/bma/test_network.py +++ b/duniterpy/tests/api/bma/test_network.py @@ -6,7 +6,7 @@ from jsonschema import ValidationError, SchemaError from duniterpy.api.bma import network from duniterpy.api.client import Client from duniterpy.api.endpoint import BMAEndpoint -from tests.api.webserver import WebFunctionalSetupMixin, web +from duniterpy.tests.api.webserver import WebFunctionalSetupMixin, web class TestBmaNetwork(WebFunctionalSetupMixin, unittest.TestCase): diff --git a/tests/api/bma/test_tx.py b/duniterpy/tests/api/bma/test_tx.py similarity index 99% rename from tests/api/bma/test_tx.py rename to duniterpy/tests/api/bma/test_tx.py index 52c0dfb0..7d4324ea 100644 --- a/tests/api/bma/test_tx.py +++ b/duniterpy/tests/api/bma/test_tx.py @@ -12,7 +12,7 @@ from duniterpy.api.bma.tx import ( ) from duniterpy.api.client import Client from duniterpy.api.endpoint import BMAEndpoint -from tests.api.webserver import WebFunctionalSetupMixin, web +from duniterpy.tests.api.webserver import WebFunctionalSetupMixin, web class TestBmaTx(WebFunctionalSetupMixin, unittest.TestCase): diff --git a/tests/api/bma/test_wot.py b/duniterpy/tests/api/bma/test_wot.py similarity index 99% rename from tests/api/bma/test_wot.py rename to duniterpy/tests/api/bma/test_wot.py index 9cd897a2..dc333712 100644 --- a/tests/api/bma/test_wot.py +++ b/duniterpy/tests/api/bma/test_wot.py @@ -16,7 +16,7 @@ from duniterpy.api.bma.wot import ( ) from duniterpy.api.client import Client from duniterpy.api.endpoint import BMAEndpoint -from tests.api.webserver import WebFunctionalSetupMixin, web +from duniterpy.tests.api.webserver import WebFunctionalSetupMixin, web class TestBmaWot(WebFunctionalSetupMixin, unittest.TestCase): diff --git a/tests/api/bma/test_ws.py b/duniterpy/tests/api/bma/test_ws.py similarity index 98% rename from tests/api/bma/test_ws.py rename to duniterpy/tests/api/bma/test_ws.py index d9915904..a62b398a 100644 --- a/tests/api/bma/test_ws.py +++ b/duniterpy/tests/api/bma/test_ws.py @@ -4,7 +4,7 @@ from jsonschema import SchemaError, ValidationError from duniterpy.api.bma.ws import WS_BLOCK_SCHEMA, WS_PEER_SCHEMA from duniterpy.api.client import parse_text -from tests.api.webserver import WebFunctionalSetupMixin +from duniterpy.tests.api.webserver import WebFunctionalSetupMixin class TestBmaWebsocket(WebFunctionalSetupMixin, unittest.TestCase): diff --git a/tests/api/webserver.py b/duniterpy/tests/api/webserver.py similarity index 100% rename from tests/api/webserver.py rename to duniterpy/tests/api/webserver.py diff --git a/tests/documents/__init__.py b/duniterpy/tests/documents/__init__.py similarity index 100% rename from tests/documents/__init__.py rename to duniterpy/tests/documents/__init__.py diff --git a/tests/documents/test_block.py b/duniterpy/tests/documents/test_block.py similarity index 100% rename from tests/documents/test_block.py rename to duniterpy/tests/documents/test_block.py diff --git a/tests/documents/test_certification.py b/duniterpy/tests/documents/test_certification.py similarity index 100% rename from tests/documents/test_certification.py rename to duniterpy/tests/documents/test_certification.py diff --git a/tests/documents/test_crc_pubkey.py b/duniterpy/tests/documents/test_crc_pubkey.py similarity index 100% rename from tests/documents/test_crc_pubkey.py rename to duniterpy/tests/documents/test_crc_pubkey.py diff --git a/tests/documents/test_membership.py b/duniterpy/tests/documents/test_membership.py similarity index 100% rename from tests/documents/test_membership.py rename to duniterpy/tests/documents/test_membership.py diff --git a/tests/documents/test_peer.py b/duniterpy/tests/documents/test_peer.py similarity index 100% rename from tests/documents/test_peer.py rename to duniterpy/tests/documents/test_peer.py diff --git a/tests/documents/test_transaction.py b/duniterpy/tests/documents/test_transaction.py similarity index 100% rename from tests/documents/test_transaction.py rename to duniterpy/tests/documents/test_transaction.py diff --git a/tests/documents/test_ws2p_heads.py b/duniterpy/tests/documents/test_ws2p_heads.py similarity index 100% rename from tests/documents/test_ws2p_heads.py rename to duniterpy/tests/documents/test_ws2p_heads.py diff --git a/tests/grammars/__init__.py b/duniterpy/tests/grammars/__init__.py similarity index 100% rename from tests/grammars/__init__.py rename to duniterpy/tests/grammars/__init__.py diff --git a/tests/grammars/test_output.py b/duniterpy/tests/grammars/test_output.py similarity index 100% rename from tests/grammars/test_output.py rename to duniterpy/tests/grammars/test_output.py diff --git a/tests/key/__init__.py b/duniterpy/tests/key/__init__.py similarity index 100% rename from tests/key/__init__.py rename to duniterpy/tests/key/__init__.py diff --git a/tests/key/test_ascii_armor.py b/duniterpy/tests/key/test_ascii_armor.py similarity index 100% rename from tests/key/test_ascii_armor.py rename to duniterpy/tests/key/test_ascii_armor.py diff --git a/tests/key/test_encryption_key.py b/duniterpy/tests/key/test_encryption_key.py similarity index 100% rename from tests/key/test_encryption_key.py rename to duniterpy/tests/key/test_encryption_key.py diff --git a/tests/key/test_public_key.py b/duniterpy/tests/key/test_public_key.py similarity index 100% rename from tests/key/test_public_key.py rename to duniterpy/tests/key/test_public_key.py diff --git a/tests/key/test_signing_key.py b/duniterpy/tests/key/test_signing_key.py similarity index 100% rename from tests/key/test_signing_key.py rename to duniterpy/tests/key/test_signing_key.py diff --git a/tests/key/test_verifying_key.py b/duniterpy/tests/key/test_verifying_key.py similarity index 100% rename from tests/key/test_verifying_key.py rename to duniterpy/tests/key/test_verifying_key.py diff --git a/setup.py b/setup.py index c0f8ac4c..bfae9f1a 100644 --- a/setup.py +++ b/setup.py @@ -1,4 +1,4 @@ -from setuptools import setup, find_packages +from setuptools import setup import duniterpy import os import re @@ -47,7 +47,7 @@ setup( version=duniterpy.__version__, - packages=find_packages(), + packages=['duniterpy'], package_data={"duniterpy": ["py.typed"]}, -- GitLab