Mercurial > mozilla > hg > ProfileManager
view profilemanager/tests/test_profilemanager.txt @ 24:853a3f4b9659
correct another typo in manager (why cut+paste is evil)
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Thu, 06 May 2010 15:43:47 -0700 |
parents | a8601c2273b5 |
children | 5988a15da3b4 |
line wrap: on
line source
Test ProfileManager =================== The obligatory imports: >>> import os >>> from profilemanager import ProfileManager Get the path to the test profiles.ini file: >>> from pkg_resources import resource_filename >>> path = os.path.join('tests', 'profiles', 'profiles.ini') >>> profiles = resource_filename('profilemanager', path) Instatiate a ProfileManager: >>> manager = ProfileManager(profiles) (I should delete any existing profiles at this point, but instead I'll defer this to later.) Create a new profile: >>> profiledir = manager.new('testprofile') >>> profiledir '...profilemanager/tests/profiles/...testprofile' Cleanup: >>> manager.remove('testprofile')