summaryrefslogtreecommitdiff
path: root/tests/test_pkg_resources.py
diff options
context:
space:
mode:
authorPhilip Thiem <ptthiem@gmail.com>2013-07-20 18:10:50 -0500
committerPhilip Thiem <ptthiem@gmail.com>2013-07-20 18:10:50 -0500
commita6e7ef0ae1e0ea1f147a2196efe7f2b82c301fe2 (patch)
tree8f73e0285965d86cbb6b8d8bc599789fd4a924ef /tests/test_pkg_resources.py
parent37c48a4da11b40a5a8a3c801525b637bb2934df1 (diff)
parent70067439d3b2b53cf2112ed0faf52c30b30ef3cd (diff)
downloadpython-setuptools-git-a6e7ef0ae1e0ea1f147a2196efe7f2b82c301fe2.tar.gz
Merge with default
--HG-- extra : rebase_source : 15517dca4272e2b088930cb5599f5822cef13bae
Diffstat (limited to 'tests/test_pkg_resources.py')
-rw-r--r--tests/test_pkg_resources.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/test_pkg_resources.py b/tests/test_pkg_resources.py
index b05ea44b..dfa27120 100644
--- a/tests/test_pkg_resources.py
+++ b/tests/test_pkg_resources.py
@@ -56,7 +56,7 @@ class TestZipProvider(object):
zp = pkg_resources.ZipProvider(mod)
filename = zp.get_resource_filename(manager, 'data.dat')
assert os.stat(filename).st_mtime == 1368379500
- f = open(filename, 'wb')
+ f = open(filename, 'w')
f.write('hello, world?')
f.close()
os.utime(filename, (1368379500, 1368379500))
@@ -64,3 +64,11 @@ class TestZipProvider(object):
f = open(filename)
assert f.read() == 'hello, world!'
manager.cleanup_resources()
+
+class TestResourceManager(object):
+ def test_get_cache_path(self):
+ mgr = pkg_resources.ResourceManager()
+ path = mgr.get_cache_path('foo')
+ type_ = str(type(path))
+ message = "Unexpected type from get_cache_path: " + type_
+ assert isinstance(path, (unicode, str)), message