summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/pkgs/assets/__init__.py0
-rw-r--r--tests/pkgs/assets/dir/fizz.txt1
-rw-r--r--tests/pkgs/assets/foo.txt1
-rw-r--r--tests/test_path.py8
4 files changed, 5 insertions, 5 deletions
diff --git a/tests/pkgs/assets/__init__.py b/tests/pkgs/assets/__init__.py
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/tests/pkgs/assets/__init__.py
diff --git a/tests/pkgs/assets/dir/fizz.txt b/tests/pkgs/assets/dir/fizz.txt
new file mode 100644
index 000000000..99f1ea4a2
--- /dev/null
+++ b/tests/pkgs/assets/dir/fizz.txt
@@ -0,0 +1 @@
+buzz
diff --git a/tests/pkgs/assets/foo.txt b/tests/pkgs/assets/foo.txt
new file mode 100644
index 000000000..5716ca598
--- /dev/null
+++ b/tests/pkgs/assets/foo.txt
@@ -0,0 +1 @@
+bar
diff --git a/tests/test_path.py b/tests/test_path.py
index 968739af4..f93b0ae90 100644
--- a/tests/test_path.py
+++ b/tests/test_path.py
@@ -11,11 +11,9 @@ class TestResourceFilename(unittest.TestCase):
return resource_filename(package, name)
def test_returns_path(self):
- path = self._callFUT('tests', 'test_path.py')
- self.assertIsInstance(path, str)
- # If it's a real path, we should be able to open and read from it.
- with open(path) as fh:
- assert fh.read(1)
+ path = self._callFUT('tests.pkgs.assets', 'foo.txt')
+ expected = os.path.join(here, 'pkgs/assets/foo.txt')
+ self.assertEqual(path, expected)
class TestCallerPath(unittest.TestCase):