Fabien C. Y. Benureau 6 years ago
parent a484bab67d
commit 9bf88649a3
No known key found for this signature in database
GPG Key ID: C3FB5E831A249A9A

@ -17,9 +17,9 @@ def command(conf, args):
while True:
# get modif from user
ui.edit_file(config.get_confpath(), temporary=False)
ui.edit_file(conf.filename, temporary=False)
new_conf = config.load_conf()
new_conf = config.load_conf(path=conf.filename)
try:
config.check_conf(new_conf)
ui.message('The configuration file was updated.')

@ -985,7 +985,7 @@ class TestUsecase(DataCommandTestCase):
alt_conf = os.path.expanduser('~/.alt_conf')
cmds = ['pubs -c ' + alt_conf + ' init',
'pubs --config ' + alt_conf + ' import data/ Page99',
'pubs list -c ' + alt_conf
'pubs list -c ' + alt_conf,
]
outs = self.execute_cmds(cmds)
# check if pubs works as expected
@ -994,6 +994,11 @@ class TestUsecase(DataCommandTestCase):
self.assertFalse(os.path.isfile(self.default_conf_path))
self.assertTrue(os.path.isfile(alt_conf))
with open(alt_conf, 'r') as fd:
conf_text = fd.read()
outs = self.execute_cmds([('pubs conf -c ' + alt_conf, conf_text)])
def test_statistics(self):
cmds = ['pubs init',
'pubs statistics',

Loading…
Cancel
Save