diff profilemanager/tests/test_profilemanager.txt @ 27:5988a15da3b4

things are being awful; checking in anyway
author Jeff Hammel <jhammel@mozilla.com>
date Thu, 06 May 2010 16:47:12 -0700
parents a8601c2273b5
children d4f0c1c4d0eb
line wrap: on
line diff
--- a/profilemanager/tests/test_profilemanager.txt	Thu May 06 15:48:20 2010 -0700
+++ b/profilemanager/tests/test_profilemanager.txt	Thu May 06 16:47:12 2010 -0700
@@ -9,15 +9,29 @@
 Get the path to the test profiles.ini file:
 
     >>> from pkg_resources import resource_filename
-    >>> path = os.path.join('tests', 'profiles', 'profiles.ini')
+    >>> profiles_dir = os.path.join('test', 'profiles')
+    >>> path = os.path.join(profiles_dir, 'profiles.ini')
     >>> profiles = resource_filename('profilemanager', path)
+    >>> print profiles
+    >>> profiles_dir = resource_filename('profilemanager', profiles_dir)
+    >>> os.path.exists(profiles)
+    True
+    >>> os.path.exists(profiles_dir)
+    True
 
 Instatiate a ProfileManager:
 
     >>> manager = ProfileManager(profiles)
 
-(I should delete any existing profiles at this point, but instead I'll
-defer this to later.)
+Remove any profiles that didn't get cleaned up:
+
+    >>> profiles_dict = manager.profiles_dict()
+    >>> for profile in profiles_dict:
+    ...    manager.remove(profile)
+    >>> os.listdir(profiles_dir)
+    ['profiles.ini']
+    >>> file(profiles).read().strip()
+    '[General]'
 
 Create a new profile: