From 2dd56990bbf207e7d0d399988115721b076816b7 Mon Sep 17 00:00:00 2001 From: Sergei Trofimov Date: Thu, 27 Apr 2017 17:30:21 +0100 Subject: [PATCH 1/3] tests: removing stale test file This file was never used (due to being incorrectly named) and contains references to APIs that no longer exit. --- wa/tests/testutils.py | 39 --------------------------------------- 1 file changed, 39 deletions(-) delete mode 100644 wa/tests/testutils.py diff --git a/wa/tests/testutils.py b/wa/tests/testutils.py deleted file mode 100644 index ed49a768..00000000 --- a/wa/tests/testutils.py +++ /dev/null @@ -1,39 +0,0 @@ -from mock import Mock -from nose.tools import assert_true - -from wa.framework import signal -from wa.framework.plugin import Plugin -from wa.utils.types import identifier - - -class SignalWatcher(object): - - signals = [] - - def __init__(self): - for sig in self.signals: - name = identifier(sig.name) - callback = Mock() - callback.im_func.__name__ = name - setattr(self, name, callback) - signal.connect(getattr(self, name), sig) - - def assert_all_called(self): - for m in self.__dict__.itervalues(): - assert_true(m.called) - - -class MockContainerActor(Plugin): - - name = 'mock-container' - kind = 'container-actor' - - def __init__(self, owner=None, *args, **kwargs): - super(MockContainerActor, self).__init__(*args, **kwargs) - self.owner=owner - self.initialize = Mock() - self.finalize = Mock() - self.enter = Mock() - self.exit = Mock() - self.job_started = Mock() - self.job_completed = Mock() From 6a5dda9bfb31af341b868cc396943b755127178f Mon Sep 17 00:00:00 2001 From: Sergei Trofimov Date: Thu, 27 Apr 2017 17:35:42 +0100 Subject: [PATCH 2/3] wa: removing log import from top-level __init__.py This import no longer exists. Should be imported from utils instead. --- wa/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wa/__init__.py b/wa/__init__.py index fa30f856..d49e133a 100644 --- a/wa/__init__.py +++ b/wa/__init__.py @@ -1,4 +1,4 @@ -from wa.framework import pluginloader, log, signal +from wa.framework import pluginloader, signal from wa.framework.command import Command, ComplexCommand, SubCommand from wa.framework.configuration import settings from wa.framework.configuration.core import Status From 2bbe300dc237daa8267e49f49ac085577d0285ff Mon Sep 17 00:00:00 2001 From: Sergei Trofimov Date: Thu, 27 Apr 2017 17:36:44 +0100 Subject: [PATCH 3/3] tests: moved out of wa package Tests now reside in the root of the repo, rather than in wa package. This means they will no longer packaged and installed in user deployments (they're only useful for developers). --- {wa/tests => tests}/__init__.py | 0 {wa/tests => tests}/data/extensions/devices/test_device.py | 0 {wa/tests => tests}/data/interrupts/after | 0 {wa/tests => tests}/data/interrupts/before | 0 {wa/tests => tests}/data/interrupts/result | 0 {wa/tests => tests}/data/logcat.2.log | 0 {wa/tests => tests}/data/logcat.log | 0 {wa/tests => tests}/data/test-agenda.yaml | 0 {wa/tests => tests}/data/test-config.py | 0 {wa/tests => tests}/test_agenda.py | 0 {wa/tests => tests}/test_config.py | 0 {wa/tests => tests}/test_diff.py | 0 {wa/tests => tests}/test_exec_control.py | 0 {wa/tests => tests}/test_plugin.py | 0 {wa/tests => tests}/test_runtime_param_utils.py | 0 {wa/tests => tests}/test_signal.py | 0 {wa/tests => tests}/test_utils.py | 0 17 files changed, 0 insertions(+), 0 deletions(-) rename {wa/tests => tests}/__init__.py (100%) rename {wa/tests => tests}/data/extensions/devices/test_device.py (100%) rename {wa/tests => tests}/data/interrupts/after (100%) rename {wa/tests => tests}/data/interrupts/before (100%) rename {wa/tests => tests}/data/interrupts/result (100%) rename {wa/tests => tests}/data/logcat.2.log (100%) rename {wa/tests => tests}/data/logcat.log (100%) rename {wa/tests => tests}/data/test-agenda.yaml (100%) rename {wa/tests => tests}/data/test-config.py (100%) rename {wa/tests => tests}/test_agenda.py (100%) rename {wa/tests => tests}/test_config.py (100%) rename {wa/tests => tests}/test_diff.py (100%) rename {wa/tests => tests}/test_exec_control.py (100%) rename {wa/tests => tests}/test_plugin.py (100%) rename {wa/tests => tests}/test_runtime_param_utils.py (100%) rename {wa/tests => tests}/test_signal.py (100%) rename {wa/tests => tests}/test_utils.py (100%) diff --git a/wa/tests/__init__.py b/tests/__init__.py similarity index 100% rename from wa/tests/__init__.py rename to tests/__init__.py diff --git a/wa/tests/data/extensions/devices/test_device.py b/tests/data/extensions/devices/test_device.py similarity index 100% rename from wa/tests/data/extensions/devices/test_device.py rename to tests/data/extensions/devices/test_device.py diff --git a/wa/tests/data/interrupts/after b/tests/data/interrupts/after similarity index 100% rename from wa/tests/data/interrupts/after rename to tests/data/interrupts/after diff --git a/wa/tests/data/interrupts/before b/tests/data/interrupts/before similarity index 100% rename from wa/tests/data/interrupts/before rename to tests/data/interrupts/before diff --git a/wa/tests/data/interrupts/result b/tests/data/interrupts/result similarity index 100% rename from wa/tests/data/interrupts/result rename to tests/data/interrupts/result diff --git a/wa/tests/data/logcat.2.log b/tests/data/logcat.2.log similarity index 100% rename from wa/tests/data/logcat.2.log rename to tests/data/logcat.2.log diff --git a/wa/tests/data/logcat.log b/tests/data/logcat.log similarity index 100% rename from wa/tests/data/logcat.log rename to tests/data/logcat.log diff --git a/wa/tests/data/test-agenda.yaml b/tests/data/test-agenda.yaml similarity index 100% rename from wa/tests/data/test-agenda.yaml rename to tests/data/test-agenda.yaml diff --git a/wa/tests/data/test-config.py b/tests/data/test-config.py similarity index 100% rename from wa/tests/data/test-config.py rename to tests/data/test-config.py diff --git a/wa/tests/test_agenda.py b/tests/test_agenda.py similarity index 100% rename from wa/tests/test_agenda.py rename to tests/test_agenda.py diff --git a/wa/tests/test_config.py b/tests/test_config.py similarity index 100% rename from wa/tests/test_config.py rename to tests/test_config.py diff --git a/wa/tests/test_diff.py b/tests/test_diff.py similarity index 100% rename from wa/tests/test_diff.py rename to tests/test_diff.py diff --git a/wa/tests/test_exec_control.py b/tests/test_exec_control.py similarity index 100% rename from wa/tests/test_exec_control.py rename to tests/test_exec_control.py diff --git a/wa/tests/test_plugin.py b/tests/test_plugin.py similarity index 100% rename from wa/tests/test_plugin.py rename to tests/test_plugin.py diff --git a/wa/tests/test_runtime_param_utils.py b/tests/test_runtime_param_utils.py similarity index 100% rename from wa/tests/test_runtime_param_utils.py rename to tests/test_runtime_param_utils.py diff --git a/wa/tests/test_signal.py b/tests/test_signal.py similarity index 100% rename from wa/tests/test_signal.py rename to tests/test_signal.py diff --git a/wa/tests/test_utils.py b/tests/test_utils.py similarity index 100% rename from wa/tests/test_utils.py rename to tests/test_utils.py