From d58eeacaecd131e297559f51b518bef80d02763e Mon Sep 17 00:00:00 2001 From: Ilya Kulakov Date: Sun, 10 Sep 2017 00:50:54 -0700 Subject: [PATCH] Move tests into separate package #59. --- {codetransformer/tests => tests}/__init__.py | 0 {codetransformer/tests => tests}/test_code.py | 0 {codetransformer/tests => tests}/test_core.py | 0 {codetransformer/tests => tests}/test_decompiler.py | 2 +- {codetransformer/tests => tests}/test_instructions.py | 0 .../transformers/tests => tests/transformers}/__init__.py | 0 .../transformers/tests => tests/transformers}/test_add2mul.py | 2 +- .../transformers/tests => tests/transformers}/test_constants.py | 2 +- .../tests => tests/transformers}/test_exc_patterns.py | 2 +- .../tests => tests/transformers}/test_interpolated_strings.py | 2 +- .../transformers/tests => tests/transformers}/test_literals.py | 2 +- .../tests => tests/transformers}/test_precomputed_slices.py | 2 +- {codetransformer/utils/tests => tests/utils}/__init__.py | 0 {codetransformer/utils/tests => tests/utils}/test_immutable.py | 0 {codetransformer/utils/tests => tests/utils}/test_pretty.py | 2 +- 15 files changed, 8 insertions(+), 8 deletions(-) rename {codetransformer/tests => tests}/__init__.py (100%) rename {codetransformer/tests => tests}/test_code.py (100%) rename {codetransformer/tests => tests}/test_core.py (100%) rename {codetransformer/tests => tests}/test_decompiler.py (99%) rename {codetransformer/tests => tests}/test_instructions.py (100%) rename {codetransformer/transformers/tests => tests/transformers}/__init__.py (100%) rename {codetransformer/transformers/tests => tests/transformers}/test_add2mul.py (71%) rename {codetransformer/transformers/tests => tests/transformers}/test_constants.py (96%) rename {codetransformer/transformers/tests => tests/transformers}/test_exc_patterns.py (94%) rename {codetransformer/transformers/tests => tests/transformers}/test_interpolated_strings.py (95%) rename {codetransformer/transformers/tests => tests/transformers}/test_literals.py (98%) rename {codetransformer/transformers/tests => tests/transformers}/test_precomputed_slices.py (91%) rename {codetransformer/utils/tests => tests/utils}/__init__.py (100%) rename {codetransformer/utils/tests => tests/utils}/test_immutable.py (100%) rename {codetransformer/utils/tests => tests/utils}/test_pretty.py (97%) diff --git a/codetransformer/tests/__init__.py b/tests/__init__.py similarity index 100% rename from codetransformer/tests/__init__.py rename to tests/__init__.py diff --git a/codetransformer/tests/test_code.py b/tests/test_code.py similarity index 100% rename from codetransformer/tests/test_code.py rename to tests/test_code.py diff --git a/codetransformer/tests/test_core.py b/tests/test_core.py similarity index 100% rename from codetransformer/tests/test_core.py rename to tests/test_core.py diff --git a/codetransformer/tests/test_decompiler.py b/tests/test_decompiler.py similarity index 99% rename from codetransformer/tests/test_decompiler.py rename to tests/test_decompiler.py index dc01f1f..8d6e1c5 100644 --- a/codetransformer/tests/test_decompiler.py +++ b/tests/test_decompiler.py @@ -18,7 +18,7 @@ reason='decompiler only runs on 3.4', ) if _343: - from ..decompiler import ( + from codetransformer.decompiler import ( DecompilationContext, decompile, paramnames, diff --git a/codetransformer/tests/test_instructions.py b/tests/test_instructions.py similarity index 100% rename from codetransformer/tests/test_instructions.py rename to tests/test_instructions.py diff --git a/codetransformer/transformers/tests/__init__.py b/tests/transformers/__init__.py similarity index 100% rename from codetransformer/transformers/tests/__init__.py rename to tests/transformers/__init__.py diff --git a/codetransformer/transformers/tests/test_add2mul.py b/tests/transformers/test_add2mul.py similarity index 71% rename from codetransformer/transformers/tests/test_add2mul.py rename to tests/transformers/test_add2mul.py index 5d617ad..cbbc2fd 100644 --- a/codetransformer/transformers/tests/test_add2mul.py +++ b/tests/transformers/test_add2mul.py @@ -1,4 +1,4 @@ -from ..add2mul import add2mul +from codetransformer.transformers.add2mul import add2mul def test_add2mul(): diff --git a/codetransformer/transformers/tests/test_constants.py b/tests/transformers/test_constants.py similarity index 96% rename from codetransformer/transformers/tests/test_constants.py rename to tests/transformers/test_constants.py index 3e61e8b..d1964a8 100644 --- a/codetransformer/transformers/tests/test_constants.py +++ b/tests/transformers/test_constants.py @@ -5,7 +5,7 @@ import pytest from codetransformer.code import Code -from ..constants import asconstants +from codetransformer.transformers.constants import asconstants basename = os.path.basename(__file__) diff --git a/codetransformer/transformers/tests/test_exc_patterns.py b/tests/transformers/test_exc_patterns.py similarity index 94% rename from codetransformer/transformers/tests/test_exc_patterns.py rename to tests/transformers/test_exc_patterns.py index 5ff6aec..b25a8d0 100644 --- a/codetransformer/transformers/tests/test_exc_patterns.py +++ b/tests/transformers/test_exc_patterns.py @@ -1,5 +1,5 @@ from pytest import raises -from ..pattern_matched_exceptions import pattern_matched_exceptions +from codetransformer.transformers.pattern_matched_exceptions import pattern_matched_exceptions def test_patterns(): diff --git a/codetransformer/transformers/tests/test_interpolated_strings.py b/tests/transformers/test_interpolated_strings.py similarity index 95% rename from codetransformer/transformers/tests/test_interpolated_strings.py rename to tests/transformers/test_interpolated_strings.py index 2e43021..060e2ce 100644 --- a/codetransformer/transformers/tests/test_interpolated_strings.py +++ b/tests/transformers/test_interpolated_strings.py @@ -2,7 +2,7 @@ import pytest -from ..interpolated_strings import interpolated_strings +from codetransformer.transformers.interpolated_strings import interpolated_strings pytestmark = pytest.mark.skipif( diff --git a/codetransformer/transformers/tests/test_literals.py b/tests/transformers/test_literals.py similarity index 98% rename from codetransformer/transformers/tests/test_literals.py rename to tests/transformers/test_literals.py index 739b9aa..02426c2 100644 --- a/codetransformer/transformers/tests/test_literals.py +++ b/tests/transformers/test_literals.py @@ -5,7 +5,7 @@ from decimal import Decimal from itertools import islice -from ..literals import ( +from codetransformer.transformers.literals import ( islice_literals, overloaded_dicts, overloaded_bytes, diff --git a/codetransformer/transformers/tests/test_precomputed_slices.py b/tests/transformers/test_precomputed_slices.py similarity index 91% rename from codetransformer/transformers/tests/test_precomputed_slices.py rename to tests/transformers/test_precomputed_slices.py index a4b795c..b70d106 100644 --- a/codetransformer/transformers/tests/test_precomputed_slices.py +++ b/tests/transformers/test_precomputed_slices.py @@ -1,7 +1,7 @@ from codetransformer.code import Code from codetransformer.instructions import BUILD_SLICE, LOAD_CONST -from ..precomputed_slices import precomputed_slices +from codetransformer.transformers.precomputed_slices import precomputed_slices def test_precomputed_slices(): diff --git a/codetransformer/utils/tests/__init__.py b/tests/utils/__init__.py similarity index 100% rename from codetransformer/utils/tests/__init__.py rename to tests/utils/__init__.py diff --git a/codetransformer/utils/tests/test_immutable.py b/tests/utils/test_immutable.py similarity index 100% rename from codetransformer/utils/tests/test_immutable.py rename to tests/utils/test_immutable.py diff --git a/codetransformer/utils/tests/test_pretty.py b/tests/utils/test_pretty.py similarity index 97% rename from codetransformer/utils/tests/test_pretty.py rename to tests/utils/test_pretty.py index edfe5c8..4cbfdfa 100644 --- a/codetransformer/utils/tests/test_pretty.py +++ b/tests/utils/test_pretty.py @@ -2,7 +2,7 @@ from textwrap import dedent from types import CodeType -from ..pretty import a, walk_code +from codetransformer.utils.pretty import a, walk_code def test_a(capsys):