From 94ad1e27bd899aff73fa48100a6d9fa12b01136c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?moto=20=28=E3=83=BB=5F=E3=83=BB=29?= Date: Wed, 21 Sep 2016 14:12:29 -0700 Subject: [PATCH] Move unit test --- setup.py | 2 +- tests/__init__.py | 8 -------- tests/unit/__init__.py | 8 ++++++++ tests/{ => unit}/env/__init__.py | 0 tests/{ => unit}/env/ale_test.py | 0 tests/{ => unit}/fixture.py | 0 tests/{ => unit}/nn/__init__.py | 0 tests/{ => unit}/nn/core/__init__.py | 0 tests/{ => unit}/nn/core/common/__init__.py | 0 tests/{ => unit}/nn/core/common/session.py | 0 tests/{ => unit}/nn/core/tensorflow/__init__.py | 0 tests/{ => unit}/nn/core/tensorflow/layer_test.py | 0 tests/{ => unit}/nn/core/theano/__init__.py | 0 tests/{ => unit}/nn/core/theano/layer_test.py | 0 tests/{ => unit}/nn/core/theano/scope_test.py | 0 tests/{ => unit}/nn/initializer_test.py | 2 +- tests/{ => unit}/nn/layer_test.py | 0 tests/{ => unit}/nn/model_test.py | 0 tests/{ => unit}/nn/optimizer_test.py | 2 +- tests/{ => unit}/nn/saver_test.py | 0 tests/{ => unit}/nn/util_test.py | 2 +- 21 files changed, 12 insertions(+), 12 deletions(-) create mode 100644 tests/unit/__init__.py rename tests/{ => unit}/env/__init__.py (100%) rename tests/{ => unit}/env/ale_test.py (100%) rename tests/{ => unit}/fixture.py (100%) rename tests/{ => unit}/nn/__init__.py (100%) rename tests/{ => unit}/nn/core/__init__.py (100%) rename tests/{ => unit}/nn/core/common/__init__.py (100%) rename tests/{ => unit}/nn/core/common/session.py (100%) rename tests/{ => unit}/nn/core/tensorflow/__init__.py (100%) rename tests/{ => unit}/nn/core/tensorflow/layer_test.py (100%) rename tests/{ => unit}/nn/core/theano/__init__.py (100%) rename tests/{ => unit}/nn/core/theano/layer_test.py (100%) rename tests/{ => unit}/nn/core/theano/scope_test.py (100%) rename tests/{ => unit}/nn/initializer_test.py (98%) rename tests/{ => unit}/nn/layer_test.py (100%) rename tests/{ => unit}/nn/model_test.py (100%) rename tests/{ => unit}/nn/optimizer_test.py (98%) rename tests/{ => unit}/nn/saver_test.py (100%) rename tests/{ => unit}/nn/util_test.py (98%) diff --git a/setup.py b/setup.py index 4f5ca855..bc19cbde 100644 --- a/setup.py +++ b/setup.py @@ -84,7 +84,7 @@ def run(self): 'luchador = luchador.exercise:entry_point', ] }, - test_suite='tests', + test_suite='tests.unit', install_requires=[ 'gym', 'h5py', diff --git a/tests/__init__.py b/tests/__init__.py index 45a98585..e69de29b 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -1,8 +0,0 @@ -from __future__ import absolute_import - -import logging - -logging.basicConfig( - level=logging.ERROR, - format='%(pathname)s:%(lineno)d:%(message)s', -) diff --git a/tests/unit/__init__.py b/tests/unit/__init__.py new file mode 100644 index 00000000..45a98585 --- /dev/null +++ b/tests/unit/__init__.py @@ -0,0 +1,8 @@ +from __future__ import absolute_import + +import logging + +logging.basicConfig( + level=logging.ERROR, + format='%(pathname)s:%(lineno)d:%(message)s', +) diff --git a/tests/env/__init__.py b/tests/unit/env/__init__.py similarity index 100% rename from tests/env/__init__.py rename to tests/unit/env/__init__.py diff --git a/tests/env/ale_test.py b/tests/unit/env/ale_test.py similarity index 100% rename from tests/env/ale_test.py rename to tests/unit/env/ale_test.py diff --git a/tests/fixture.py b/tests/unit/fixture.py similarity index 100% rename from tests/fixture.py rename to tests/unit/fixture.py diff --git a/tests/nn/__init__.py b/tests/unit/nn/__init__.py similarity index 100% rename from tests/nn/__init__.py rename to tests/unit/nn/__init__.py diff --git a/tests/nn/core/__init__.py b/tests/unit/nn/core/__init__.py similarity index 100% rename from tests/nn/core/__init__.py rename to tests/unit/nn/core/__init__.py diff --git a/tests/nn/core/common/__init__.py b/tests/unit/nn/core/common/__init__.py similarity index 100% rename from tests/nn/core/common/__init__.py rename to tests/unit/nn/core/common/__init__.py diff --git a/tests/nn/core/common/session.py b/tests/unit/nn/core/common/session.py similarity index 100% rename from tests/nn/core/common/session.py rename to tests/unit/nn/core/common/session.py diff --git a/tests/nn/core/tensorflow/__init__.py b/tests/unit/nn/core/tensorflow/__init__.py similarity index 100% rename from tests/nn/core/tensorflow/__init__.py rename to tests/unit/nn/core/tensorflow/__init__.py diff --git a/tests/nn/core/tensorflow/layer_test.py b/tests/unit/nn/core/tensorflow/layer_test.py similarity index 100% rename from tests/nn/core/tensorflow/layer_test.py rename to tests/unit/nn/core/tensorflow/layer_test.py diff --git a/tests/nn/core/theano/__init__.py b/tests/unit/nn/core/theano/__init__.py similarity index 100% rename from tests/nn/core/theano/__init__.py rename to tests/unit/nn/core/theano/__init__.py diff --git a/tests/nn/core/theano/layer_test.py b/tests/unit/nn/core/theano/layer_test.py similarity index 100% rename from tests/nn/core/theano/layer_test.py rename to tests/unit/nn/core/theano/layer_test.py diff --git a/tests/nn/core/theano/scope_test.py b/tests/unit/nn/core/theano/scope_test.py similarity index 100% rename from tests/nn/core/theano/scope_test.py rename to tests/unit/nn/core/theano/scope_test.py diff --git a/tests/nn/initializer_test.py b/tests/unit/nn/initializer_test.py similarity index 98% rename from tests/nn/initializer_test.py rename to tests/unit/nn/initializer_test.py index bd1fc166..e48eadb8 100644 --- a/tests/nn/initializer_test.py +++ b/tests/unit/nn/initializer_test.py @@ -2,7 +2,7 @@ import unittest -from tests.fixture import get_initializers +from tests.unit.fixture import get_initializers from luchador.nn import get_initializer INITIALIZERS = get_initializers() diff --git a/tests/nn/layer_test.py b/tests/unit/nn/layer_test.py similarity index 100% rename from tests/nn/layer_test.py rename to tests/unit/nn/layer_test.py diff --git a/tests/nn/model_test.py b/tests/unit/nn/model_test.py similarity index 100% rename from tests/nn/model_test.py rename to tests/unit/nn/model_test.py diff --git a/tests/nn/optimizer_test.py b/tests/unit/nn/optimizer_test.py similarity index 98% rename from tests/nn/optimizer_test.py rename to tests/unit/nn/optimizer_test.py index b9f1f8f6..7f125098 100644 --- a/tests/nn/optimizer_test.py +++ b/tests/unit/nn/optimizer_test.py @@ -2,7 +2,7 @@ import unittest -from tests.fixture import get_optimizers +from tests.unit.fixture import get_optimizers from luchador.nn import get_optimizer OPTIMIZERS = get_optimizers() diff --git a/tests/nn/saver_test.py b/tests/unit/nn/saver_test.py similarity index 100% rename from tests/nn/saver_test.py rename to tests/unit/nn/saver_test.py diff --git a/tests/nn/util_test.py b/tests/unit/nn/util_test.py similarity index 98% rename from tests/nn/util_test.py rename to tests/unit/nn/util_test.py index 6dfa0e53..23cf6b53 100644 --- a/tests/nn/util_test.py +++ b/tests/unit/nn/util_test.py @@ -2,7 +2,7 @@ import unittest -from tests.fixture import ( +from tests.unit.fixture import ( get_layers, get_optimizers, get_initializers,