Rev 5353: Merge deprecate-get-parser-file into simplify-test-config-building in file:///home/vila/src/bzr/bugs/525571-lock-bazaar-conf-files/

Vincent Ladeuil v.ladeuil+lp at free.fr
Mon Jul 19 11:10:33 BST 2010


At file:///home/vila/src/bzr/bugs/525571-lock-bazaar-conf-files/

------------------------------------------------------------
revno: 5353 [merge]
revision-id: v.ladeuil+lp at free.fr-20100719101033-34jbrhpv36qy2r7h
parent: v.ladeuil+lp at free.fr-20100719093144-xh55czw06o6sdncd
parent: v.ladeuil+lp at free.fr-20100719100839-oxg54wcacethbfxd
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: simplify-test-config-building
timestamp: Mon 2010-07-19 12:10:33 +0200
message:
  Merge deprecate-get-parser-file into simplify-test-config-building
modified:
  bzrlib/plugins/launchpad/test_account.py test_account.py-20071011033320-50y6vfftywf4yllw-2
  bzrlib/tests/test_config.py    testconfig.py-20051011041908-742d0c15d8d8c8eb
  bzrlib/tests/test_smtp_connection.py test_smtp_connection-20070618204509-wuyxc0r0ztrecv7e-1
-------------- next part --------------
=== modified file 'bzrlib/plugins/launchpad/test_account.py'
--- a/bzrlib/plugins/launchpad/test_account.py	2009-03-23 14:59:43 +0000
+++ b/bzrlib/plugins/launchpad/test_account.py	2010-07-19 10:08:39 +0000
@@ -26,9 +26,7 @@
 class LaunchpadAccountTests(TestCaseInTempDir):
 
     def setup_config(self, text):
-        my_config = config.GlobalConfig()
-        config_file = StringIO(text)
-        my_config._get_parser(config_file)
+        my_config = config.GlobalConfig(_content=StringIO(text))
         return my_config
 
     def test_get_lp_login_unconfigured(self):

=== modified file 'bzrlib/tests/test_config.py'
--- a/bzrlib/tests/test_config.py	2010-07-19 09:31:44 +0000
+++ b/bzrlib/tests/test_config.py	2010-07-19 10:10:33 +0000
@@ -389,6 +389,7 @@
             'IniBasedConfig.__init__(get_filename) was deprecated in 2.3.'
             ' Use file_name instead.'],
             config.IniBasedConfig, lambda: 'ini.conf')
+        self.assertEqual('ini.conf', conf.file_name)
 
     def test_get_parser_file_parameter_is_deprecated_(self):
         config_file = StringIO(sample_config_text.encode('utf-8'))

=== modified file 'bzrlib/tests/test_smtp_connection.py'
--- a/bzrlib/tests/test_smtp_connection.py	2009-07-19 01:36:56 +0000
+++ b/bzrlib/tests/test_smtp_connection.py	2010-07-19 10:08:39 +0000
@@ -91,9 +91,7 @@
 class TestSMTPConnection(tests.TestCaseInTempDir):
 
     def get_connection(self, text, smtp_factory=None):
-        my_config = config.GlobalConfig()
-        config_file = StringIO(text)
-        my_config._get_parser(config_file)
+        my_config = config.GlobalConfig(_content=StringIO(text))
         return smtp_connection.SMTPConnection(my_config,
                                               _smtp_factory=smtp_factory)
 



More information about the bazaar-commits mailing list