def test_grocker_yml(self): with mkchtmpdir() as tmp_dir: write_file(tmp_dir, '.grocker.yml', self.grocker_yml_content) config = grocker_utils.parse_config([]) self.assertIn('not_used_key', config) # .grocker.yml is read self.assertIn('entrypoint_name', config) # grocker internal config is read
def test_parse_config(self): with mkchtmpdir() as tmp_dir: write_file(tmp_dir, '.grocker.yml', self.grocker_yml_content) write_file(tmp_dir, 'first.yml', self.first_config_content) write_file(tmp_dir, 'second.yml', self.second_config_content) config = grocker_utils.parse_config(['first.yml', 'second.yml']) self.assertNotIn('not_used_key', config) # .grocker.yml is not read self.assertIn('entrypoint_name', config) # grocker internal config is read self.assertEqual(config.get('dependencies'), 'first.yml') # from first.yml self.assertEqual(config.get('runtime'), 'second.yml') # from second.yml self.assertEqual(config.get('file'), 'second.yml') # from second.yml
def test_not_grocker_yml(self): with mkchtmpdir(): config = grocker_utils.parse_config([]) self.assertIn('entrypoint_name', config) # grocker internal config is read
def test_empty_config(self): with mkchtmpdir() as tmp_dir: write_file(tmp_dir, 'empty.yml', '') config = grocker_utils.parse_config(['empty.yml']) self.assertIn('entrypoint_name', config) # grocker internal config is read