def test_cfg_error(self): cfg = util.config.config with self.assertRaises(occo.exceptions.ConfigurationError): try: c = cfg(args=[]) except occo.exceptions.ConfigurationError as e: print str(e) raise
def test_cfg_param(self): cfg = util.config.config cfgfile = util.rel_to_file('comm_test_cfg.yaml', relative_cwd=True) abscfgfile = util.rel_to_file('comm_test_cfg.yaml', relative_cwd=False) c = cfg(cfg_path=cfgfile, args=[]) self.assertEqual(c.cfg_path, abscfgfile)
def test_cfg_args(self): cfg = util.config.config c = cfg(args=[ '--cfg', util.rel_to_file('comm_test_cfg.yaml', relative_cwd=True) ])
def test_cfg_args(self): cfg = util.config.config c = cfg(args=['--cfg', util.rel_to_file('comm_test_cfg.yaml', relative_cwd=True)])