From 2448c5aea19da150821e46c0555369ed02d666a0 Mon Sep 17 00:00:00 2001 From: Lakshmi Narasimhan Date: Mon, 9 Nov 2015 19:10:27 +0530 Subject: [PATCH] Fix imports to reflect `tests` folder not being a python package. --- tests/__init__.py | 0 tests/ext/test_grouper.py | 2 +- tests/ext/test_sass.py | 2 +- tests/ext/test_scss.py | 2 +- tests/ext/test_uglify.py | 2 +- tests/test_plugin.py | 14 +++++++------- 6 files changed, 11 insertions(+), 11 deletions(-) delete mode 100644 tests/__init__.py diff --git a/tests/__init__.py b/tests/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/tests/ext/test_grouper.py b/tests/ext/test_grouper.py index 216f1ce..0c9d57c 100644 --- a/tests/ext/test_grouper.py +++ b/tests/ext/test_grouper.py @@ -12,7 +12,7 @@ from hyde.model import Config, Expando from fswrap import File import yaml -from ..util import assert_html_equals +from util import assert_html_equals TEST_SITE = File(__file__).parent.parent.child_folder('_test') diff --git a/tests/ext/test_sass.py b/tests/ext/test_sass.py index fa0b5f0..488344e 100644 --- a/tests/ext/test_sass.py +++ b/tests/ext/test_sass.py @@ -9,7 +9,7 @@ from hyde.site import Site from fswrap import File, Folder -from ..util import assert_no_diff +from util import assert_no_diff SCSS_SOURCE = File(__file__).parent.child_folder('scss') TEST_SITE = File(__file__).parent.parent.child_folder('_test') diff --git a/tests/ext/test_scss.py b/tests/ext/test_scss.py index c22b216..acf55a8 100644 --- a/tests/ext/test_scss.py +++ b/tests/ext/test_scss.py @@ -9,7 +9,7 @@ from hyde.site import Site from fswrap import File, Folder -from ..util import assert_no_diff +from util import assert_no_diff SCSS_SOURCE = File(__file__).parent.child_folder('scss') TEST_SITE = File(__file__).parent.parent.child_folder('_test') diff --git a/tests/ext/test_uglify.py b/tests/ext/test_uglify.py index 3918f68..9b0fd51 100644 --- a/tests/ext/test_uglify.py +++ b/tests/ext/test_uglify.py @@ -11,7 +11,7 @@ from hyde.site import Site from fswrap import File, Folder -from ..util import assert_no_diff +from util import assert_no_diff UGLIFY_SOURCE = File(__file__).parent.child_folder('uglify') TEST_SITE = File(__file__).parent.parent.child_folder('_test') diff --git a/tests/test_plugin.py b/tests/test_plugin.py index f21e919..ff7525e 100644 --- a/tests/test_plugin.py +++ b/tests/test_plugin.py @@ -68,7 +68,7 @@ class TestPlugins(object): def setUp(self): self.site = Site(TEST_SITE) - self.site.config.plugins = ['tests.test_plugin.PluginLoaderStub'] + self.site.config.plugins = ['test_plugin.PluginLoaderStub'] def test_can_load_plugin_modules(self): assert not len(self.site.plugins) @@ -354,8 +354,8 @@ class TestPlugins(object): def test_plugin_chaining(self): self.site.config.plugins = [ - 'tests.test_plugin.ConstantReturnPlugin', - 'tests.test_plugin.NoReturnPlugin' + 'test_plugin.ConstantReturnPlugin', + 'test_plugin.NoReturnPlugin' ] path = self.site.content.source_folder.child('about.html') gen = Generator(self.site) @@ -372,8 +372,8 @@ class TestPlugins(object): with patch.object(NoReturnPlugin, 'begin_text_resource', new=Mock(wraps=empty_return)) as mock2: self.site.config.plugins = [ - 'tests.test_plugin.ConstantReturnPlugin', - 'tests.test_plugin.NoReturnPlugin' + 'test_plugin.ConstantReturnPlugin', + 'test_plugin.NoReturnPlugin' ] self.site.config.constantreturn = Expando( dict(include_file_pattern="*.css")) @@ -400,8 +400,8 @@ class TestPlugins(object): with patch.object(NoReturnPlugin, 'begin_text_resource', new=Mock(wraps=empty_return)) as mock2: self.site.config.plugins = [ - 'tests.test_plugin.ConstantReturnPlugin', - 'tests.test_plugin.NoReturnPlugin' + 'test_plugin.ConstantReturnPlugin', + 'test_plugin.NoReturnPlugin' ] self.site.config.constantreturn = Expando( dict(include_paths="media"))