diff options
author | Vipin Balachandran <vbala@vmware.com> | 2016-11-23 13:07:14 +0530 |
---|---|---|
committer | Vipin Balachandran <vbala@vmware.com> | 2016-12-08 12:30:15 +0530 |
commit | 5fbbff1e02c5a38ce48663b6fbdb3f120fe263b2 (patch) | |
tree | 455dfd96f34a652ad3cdc9ee679424f4a2530cd1 | |
parent | daf77e674b5b0bbc2c05fd7e6ef90edf1597c609 (diff) | |
download | osprofiler-5fbbff1e02c5a38ce48663b6fbdb3f120fe263b2.tar.gz |
Organize unit tests under tests/unit folder
Moving all unit tests to tests/unit so that we can start writing
functional tests for verifying notifier backends against osprofiler
patches.
Change-Id: I40a415df6e271f19c7b116471499d24eb45425db
-rw-r--r-- | .testr.conf | 2 | ||||
-rw-r--r-- | osprofiler/tests/unit/__init__.py (renamed from osprofiler/tests/cmd/__init__.py) | 0 | ||||
-rw-r--r-- | osprofiler/tests/unit/cmd/__init__.py (renamed from osprofiler/tests/doc/__init__.py) | 0 | ||||
-rw-r--r-- | osprofiler/tests/unit/cmd/test_shell.py (renamed from osprofiler/tests/cmd/test_shell.py) | 0 | ||||
-rw-r--r-- | osprofiler/tests/unit/doc/__init__.py (renamed from osprofiler/tests/drivers/__init__.py) | 0 | ||||
-rw-r--r-- | osprofiler/tests/unit/doc/test_specs.py (renamed from osprofiler/tests/doc/test_specs.py) | 2 | ||||
-rw-r--r-- | osprofiler/tests/unit/drivers/__init__.py | 0 | ||||
-rw-r--r-- | osprofiler/tests/unit/drivers/test_base.py (renamed from osprofiler/tests/drivers/test_base.py) | 0 | ||||
-rw-r--r-- | osprofiler/tests/unit/drivers/test_ceilometer.py (renamed from osprofiler/tests/drivers/test_ceilometer.py) | 0 | ||||
-rw-r--r-- | osprofiler/tests/unit/drivers/test_elasticsearch.py (renamed from osprofiler/tests/drivers/test_elasticsearch.py) | 0 | ||||
-rw-r--r-- | osprofiler/tests/unit/drivers/test_loginsight.py (renamed from osprofiler/tests/drivers/test_loginsight.py) | 0 | ||||
-rw-r--r-- | osprofiler/tests/unit/drivers/test_messaging.py (renamed from osprofiler/tests/drivers/test_messaging.py) | 0 | ||||
-rw-r--r-- | osprofiler/tests/unit/drivers/test_mongodb.py (renamed from osprofiler/tests/drivers/test_mongodb.py) | 0 | ||||
-rw-r--r-- | osprofiler/tests/unit/drivers/test_redis_driver.py (renamed from osprofiler/tests/drivers/test_redis_driver.py) | 0 | ||||
-rw-r--r-- | osprofiler/tests/unit/test_notifier.py (renamed from osprofiler/tests/test_notifier.py) | 0 | ||||
-rw-r--r-- | osprofiler/tests/unit/test_opts.py (renamed from osprofiler/tests/test_opts.py) | 0 | ||||
-rw-r--r-- | osprofiler/tests/unit/test_profiler.py (renamed from osprofiler/tests/test_profiler.py) | 27 | ||||
-rw-r--r-- | osprofiler/tests/unit/test_sqlalchemy.py (renamed from osprofiler/tests/test_sqlalchemy.py) | 0 | ||||
-rw-r--r-- | osprofiler/tests/unit/test_utils.py (renamed from osprofiler/tests/test_utils.py) | 0 | ||||
-rw-r--r-- | osprofiler/tests/unit/test_web.py (renamed from osprofiler/tests/test_web.py) | 0 |
20 files changed, 17 insertions, 14 deletions
diff --git a/.testr.conf b/.testr.conf index 27df784..ca3d5fa 100644 --- a/.testr.conf +++ b/.testr.conf @@ -1,4 +1,4 @@ [DEFAULT] -test_command=OS_STDOUT_CAPTURE=1 OS_STDERR_CAPTURE=1 ${PYTHON:-python} -m subunit.run discover -t ./ ./osprofiler/tests $LISTOPT $IDOPTION +test_command=OS_STDOUT_CAPTURE=1 OS_STDERR_CAPTURE=1 ${PYTHON:-python} -m subunit.run discover -t ./ ./osprofiler/tests/unit $LISTOPT $IDOPTION test_id_option=--load-list $IDFILE test_list_option=--list diff --git a/osprofiler/tests/cmd/__init__.py b/osprofiler/tests/unit/__init__.py index e69de29..e69de29 100644 --- a/osprofiler/tests/cmd/__init__.py +++ b/osprofiler/tests/unit/__init__.py diff --git a/osprofiler/tests/doc/__init__.py b/osprofiler/tests/unit/cmd/__init__.py index e69de29..e69de29 100644 --- a/osprofiler/tests/doc/__init__.py +++ b/osprofiler/tests/unit/cmd/__init__.py diff --git a/osprofiler/tests/cmd/test_shell.py b/osprofiler/tests/unit/cmd/test_shell.py index 161a113..161a113 100644 --- a/osprofiler/tests/cmd/test_shell.py +++ b/osprofiler/tests/unit/cmd/test_shell.py diff --git a/osprofiler/tests/drivers/__init__.py b/osprofiler/tests/unit/doc/__init__.py index e69de29..e69de29 100644 --- a/osprofiler/tests/drivers/__init__.py +++ b/osprofiler/tests/unit/doc/__init__.py diff --git a/osprofiler/tests/doc/test_specs.py b/osprofiler/tests/unit/doc/test_specs.py index 39cabb5..fe2b867 100644 --- a/osprofiler/tests/doc/test_specs.py +++ b/osprofiler/tests/unit/doc/test_specs.py @@ -23,7 +23,7 @@ class TitlesTestCase(test.TestCase): specs_path = os.path.join( os.path.dirname(__file__), - os.pardir, os.pardir, os.pardir, + os.pardir, os.pardir, os.pardir, os.pardir, "doc", "specs") def _get_title(self, section_tree): diff --git a/osprofiler/tests/unit/drivers/__init__.py b/osprofiler/tests/unit/drivers/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/osprofiler/tests/unit/drivers/__init__.py diff --git a/osprofiler/tests/drivers/test_base.py b/osprofiler/tests/unit/drivers/test_base.py index 462559b..462559b 100644 --- a/osprofiler/tests/drivers/test_base.py +++ b/osprofiler/tests/unit/drivers/test_base.py diff --git a/osprofiler/tests/drivers/test_ceilometer.py b/osprofiler/tests/unit/drivers/test_ceilometer.py index 0daf2fa..0daf2fa 100644 --- a/osprofiler/tests/drivers/test_ceilometer.py +++ b/osprofiler/tests/unit/drivers/test_ceilometer.py diff --git a/osprofiler/tests/drivers/test_elasticsearch.py b/osprofiler/tests/unit/drivers/test_elasticsearch.py index c7385de..c7385de 100644 --- a/osprofiler/tests/drivers/test_elasticsearch.py +++ b/osprofiler/tests/unit/drivers/test_elasticsearch.py diff --git a/osprofiler/tests/drivers/test_loginsight.py b/osprofiler/tests/unit/drivers/test_loginsight.py index 5e28aee..5e28aee 100644 --- a/osprofiler/tests/drivers/test_loginsight.py +++ b/osprofiler/tests/unit/drivers/test_loginsight.py diff --git a/osprofiler/tests/drivers/test_messaging.py b/osprofiler/tests/unit/drivers/test_messaging.py index 6a13905..6a13905 100644 --- a/osprofiler/tests/drivers/test_messaging.py +++ b/osprofiler/tests/unit/drivers/test_messaging.py diff --git a/osprofiler/tests/drivers/test_mongodb.py b/osprofiler/tests/unit/drivers/test_mongodb.py index 34f8d45..34f8d45 100644 --- a/osprofiler/tests/drivers/test_mongodb.py +++ b/osprofiler/tests/unit/drivers/test_mongodb.py diff --git a/osprofiler/tests/drivers/test_redis_driver.py b/osprofiler/tests/unit/drivers/test_redis_driver.py index 7bcad47..7bcad47 100644 --- a/osprofiler/tests/drivers/test_redis_driver.py +++ b/osprofiler/tests/unit/drivers/test_redis_driver.py diff --git a/osprofiler/tests/test_notifier.py b/osprofiler/tests/unit/test_notifier.py index 332e620..332e620 100644 --- a/osprofiler/tests/test_notifier.py +++ b/osprofiler/tests/unit/test_notifier.py diff --git a/osprofiler/tests/test_opts.py b/osprofiler/tests/unit/test_opts.py index c5963b9..c5963b9 100644 --- a/osprofiler/tests/test_opts.py +++ b/osprofiler/tests/unit/test_opts.py diff --git a/osprofiler/tests/test_profiler.py b/osprofiler/tests/unit/test_profiler.py index 195e298..6edd467 100644 --- a/osprofiler/tests/test_profiler.py +++ b/osprofiler/tests/unit/test_profiler.py @@ -202,7 +202,7 @@ class TraceDecoratorTestCase(test.TestCase): expected_info = { "info": "some_info", "function": { - "name": "osprofiler.tests.test_profiler.tracede_func", + "name": "osprofiler.tests.unit.test_profiler.tracede_func", "args": str((1,)), "kwargs": str({}) } @@ -216,7 +216,8 @@ class TraceDecoratorTestCase(test.TestCase): self.assertEqual((1, 2), trace_hide_args_func(1, i=2)) expected_info = { "function": { - "name": "osprofiler.tests.test_profiler.trace_hide_args_func" + "name": "osprofiler.tests.unit.test_profiler" + ".trace_hide_args_func" } } mock_start.assert_called_once_with("hide_args", info=expected_info) @@ -304,7 +305,7 @@ class TraceClsDecoratorTestCase(test.TestCase): expected_info = { "a": 10, "function": { - "name": ("osprofiler.tests.test_profiler" + "name": ("osprofiler.tests.unit.test_profiler" ".FakeTraceClassWithInfo.method1"), "args": str((fake_cls, 5, 15)), "kwargs": str({}) @@ -323,7 +324,7 @@ class TraceClsDecoratorTestCase(test.TestCase): expected_info = { "a": 10, "function": { - "name": ("osprofiler.tests.test_profiler" + "name": ("osprofiler.tests.unit.test_profiler" ".FakeTraceClassWithInfo.method3"), "args": str((fake_cls,)), "kwargs": str({"g": 5, "h": 10}) @@ -350,7 +351,7 @@ class TraceClsDecoratorTestCase(test.TestCase): expected_info = { "b": 20, "function": { - "name": ("osprofiler.tests.test_profiler" + "name": ("osprofiler.tests.unit.test_profiler" ".FakeTraceClassHideArgs.method1"), } } @@ -368,7 +369,7 @@ class TraceClsDecoratorTestCase(test.TestCase): expected_info = { "function": { - "name": ("osprofiler.tests.test_profiler" + "name": ("osprofiler.tests.unit.test_profiler" ".FakeTracePrivate._method"), "args": str((fake_cls, 5)), "kwargs": str({}) @@ -398,8 +399,10 @@ class TraceClsDecoratorTestCase(test.TestCase): # static and doesn't have reference to class # - and FakeTraceStatic.method4 in PY3 "name": - "osprofiler.tests.test_profiler.method4" if six.PY2 else - "osprofiler.tests.test_profiler.FakeTraceStatic.method4", + "osprofiler.tests.unit.test_profiler" + ".method4" if six.PY2 else + "osprofiler.tests.unit.test_profiler.FakeTraceStatic" + ".method4", "args": str((25,)), "kwargs": str({}) } @@ -482,7 +485,7 @@ class TraceWithMetaclassTestCase(test.TestCase): expected_info = { "a": 10, "function": { - "name": ("osprofiler.tests.test_profiler" + "name": ("osprofiler.tests.unit.test_profiler" ".FakeTraceWithMetaclassBase.method1"), "args": str((fake_cls, 5, 15)), "kwargs": str({}) @@ -501,7 +504,7 @@ class TraceWithMetaclassTestCase(test.TestCase): expected_info = { "a": 10, "function": { - "name": ("osprofiler.tests.test_profiler" + "name": ("osprofiler.tests.unit.test_profiler" ".FakeTraceWithMetaclassBase.method3"), "args": str((fake_cls,)), "kwargs": str({"g": 5, "h": 10}) @@ -528,7 +531,7 @@ class TraceWithMetaclassTestCase(test.TestCase): expected_info = { "b": 20, "function": { - "name": ("osprofiler.tests.test_profiler" + "name": ("osprofiler.tests.unit.test_profiler" ".FakeTraceWithMetaclassHideArgs.method5") } } @@ -546,7 +549,7 @@ class TraceWithMetaclassTestCase(test.TestCase): expected_info = { "function": { - "name": ("osprofiler.tests.test_profiler" + "name": ("osprofiler.tests.unit.test_profiler" ".FakeTraceWithMetaclassPrivate._new_private_method"), "args": str((fake_cls, 5)), "kwargs": str({}) diff --git a/osprofiler/tests/test_sqlalchemy.py b/osprofiler/tests/unit/test_sqlalchemy.py index 7534511..7534511 100644 --- a/osprofiler/tests/test_sqlalchemy.py +++ b/osprofiler/tests/unit/test_sqlalchemy.py diff --git a/osprofiler/tests/test_utils.py b/osprofiler/tests/unit/test_utils.py index 19aff30..19aff30 100644 --- a/osprofiler/tests/test_utils.py +++ b/osprofiler/tests/unit/test_utils.py diff --git a/osprofiler/tests/test_web.py b/osprofiler/tests/unit/test_web.py index 24b3906..24b3906 100644 --- a/osprofiler/tests/test_web.py +++ b/osprofiler/tests/unit/test_web.py |