changeset 56:042a1b2a3e8a

start flushing out tests
author Jeff Hammel <jhammel@mozilla.com>
date Wed, 23 Jan 2013 16:01:29 -0800
parents 72e521851f1a
children d5e5c7496784
files paint/info.py tests/doctest.txt
diffstat 2 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/paint/info.py	Wed Jan 23 15:35:49 2013 -0800
+++ b/paint/info.py	Wed Jan 23 16:01:29 2013 -0800
@@ -30,7 +30,12 @@
         sys.modules['setuptools'] = sys.modules[__name__]
         globals()['setup'] = self._setup
         try:
-            
+            module = imp.load_source('setup', setup_py)
+        finally:
+            sys.modules.pop('setuptools')
+            if setuptools:
+                sys.modules['setuptools'] = setuptools
+            globals().pop('setup')
         return self.__dict__.pop('_info')
 
     def _setup(self, **kwargs):
--- a/tests/doctest.txt	Wed Jan 23 15:35:49 2013 -0800
+++ b/tests/doctest.txt	Wed Jan 23 16:01:29 2013 -0800
@@ -3,6 +3,7 @@
 
 The obligatory imports::
 
+    >>> import os
     >>> import paint
 
 Get the dependencies of a package::
@@ -17,3 +18,5 @@
 an interface that overrides ``setuptools.setup``::
 
     >>> import paint.info
+    >>> dummy_path = os.path.join(here, 'dummy')
+    >>> package_info = paint.info.SetupOverridePackageInfo(dummy_path)