Mercurial > mozilla > hg > ProfileManager
changeset 19:4a1815f8d146
* stub adding new profile to configuration
* stub tests; have one mysterious failure with doctest :(
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Thu, 06 May 2010 12:42:27 -0700 |
parents | 8e651dd8e9ad |
children | 49d523a33c89 |
files | profilemanager/manager.py profilemanager/tests/test_profilemanager.txt |
diffstat | 2 files changed, 18 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/profilemanager/manager.py Thu May 06 12:02:14 2010 -0700 +++ b/profilemanager/manager.py Thu May 06 12:42:27 2010 -0700 @@ -51,9 +51,20 @@ # TODO: (optionally) pre-populate the directory a la FF os.mkdir(dirname) + # update profiles.ini + parser = ConfigParser() + parser.read(self.profiles) + # return the directory name return dirname + def remove(self, name, delete=True): + """ + remove a profile from profiles.ini + - delete: delete the profile as well + """ + raise NotImplementedError + def list(self, directories=False): """ lists the profiles available in the config file
--- a/profilemanager/tests/test_profilemanager.txt Thu May 06 12:02:14 2010 -0700 +++ b/profilemanager/tests/test_profilemanager.txt Thu May 06 12:42:27 2010 -0700 @@ -18,4 +18,10 @@ Create a new profile: - >>> manager.new('testprofile') + >>> profiledir = manager.new('testprofile') + >>> print profiledir + ...profilemanager/tests/profiles/...testprofile + +Cleanup: + + >>> manager.remove('testprofile')