From 1c3f54184fb3bb64af1bebfbf881ce9445adb3af Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Wed, 15 Apr 2015 11:45:07 -0400 Subject: [PATCH 1/4] BLD/TST : install testing module --- conda-recipe/meta.yaml | 1 + setup.py | 5 +++-- vttools/tests/test_scape.py | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/conda-recipe/meta.yaml b/conda-recipe/meta.yaml index d34e24c..9dea668 100644 --- a/conda-recipe/meta.yaml +++ b/conda-recipe/meta.yaml @@ -28,6 +28,7 @@ requirements: test: imports: - vttools + - vttools.tests about: license: 3-Clause BSD diff --git a/setup.py b/setup.py index f3acbf0..07498a9 100644 --- a/setup.py +++ b/setup.py @@ -9,7 +9,8 @@ packages=["vttools", 'vttools.vtmods', 'vttools.vtmods.import_lists', - 'vttools.to_wrap' + 'vttools.to_wrap', + 'vttools.tests' ], - package_data = {'vttools.vtmods.import_lists': ['*.yaml']} + package_data={'vttools.vtmods.import_lists': ['*.yaml']} ) diff --git a/vttools/tests/test_scape.py b/vttools/tests/test_scape.py index 62cc825..ab93c20 100644 --- a/vttools/tests/test_scape.py +++ b/vttools/tests/test_scape.py @@ -46,7 +46,8 @@ from numpy.testing import assert_string_equal, assert_equal, assert_raises from nose.tools import assert_true -from scrape_test_source import eat_porridge, porridge_for_the_bears, has_defaults +from scrape_test_source import (eat_porridge, porridge_for_the_bears, + has_defaults) def test_scrape(): From 083463afcf30be07df8715c7d7e59354f78e5144 Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Wed, 15 Apr 2015 11:54:58 -0400 Subject: [PATCH 2/4] BLD : make tests a module --- vttools/tests/__init__.py | 1 + 1 file changed, 1 insertion(+) create mode 100644 vttools/tests/__init__.py diff --git a/vttools/tests/__init__.py b/vttools/tests/__init__.py new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/vttools/tests/__init__.py @@ -0,0 +1 @@ + From 5982dfe1ef4d03e760c2aa1d3fd0145c49b2ddff Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Wed, 15 Apr 2015 13:41:23 -0400 Subject: [PATCH 3/4] TST : correct imports --- vttools/tests/test_scape.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vttools/tests/test_scape.py b/vttools/tests/test_scape.py index ab93c20..61ec0eb 100644 --- a/vttools/tests/test_scape.py +++ b/vttools/tests/test_scape.py @@ -46,8 +46,8 @@ from numpy.testing import assert_string_equal, assert_equal, assert_raises from nose.tools import assert_true -from scrape_test_source import (eat_porridge, porridge_for_the_bears, - has_defaults) +from vttools.tests.scrape_test_source import ( + eat_porridge, porridge_for_the_bears, has_defaults) def test_scrape(): From 776197e98df235f989fbe08a46ed8b32a14e7b15 Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Wed, 15 Apr 2015 14:07:25 -0400 Subject: [PATCH 4/4] TST : fix test fixtures Always run the tests --- vttools/tests/test_scape.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vttools/tests/test_scape.py b/vttools/tests/test_scape.py index 61ec0eb..adde757 100644 --- a/vttools/tests/test_scape.py +++ b/vttools/tests/test_scape.py @@ -352,7 +352,9 @@ def test_module_scrape(): ({'exclude_private': False}, {}, ['_private'])) for pre, post, tst_lst in tests: - yield _mod_scrape_test_helper, 'scrape_test_source', pre, post, tst_lst + yield (_mod_scrape_test_helper, + 'vttools.tests.scrape_test_source', + pre, post, tst_lst) def _mod_scrape_test_helper(mod_name, kwargs_with, kwargs_without,