def test_from_overlays(self): self._check_matching(JobConfig()) jc = JobConfig(job_name='TestIngester', preload=True, data_directory='/tmp/a', job_group='gg', tracing='info') jc.comment = 'Test configuration' jc.target_pe_count = 2 self._check_matching(jc) jc = JobConfig(job_name='TestIngester2') jc.comment = 'Test configuration2' self._check_matching(jc) jc = JobConfig(preload=True) jc.raw_overlay = {'a': 34} self._check_matching(jc) jc = JobConfig(preload=True) jc.raw_overlay = {'x': 'fff'} jc.submission_parameters['one'] = 1 jc.submission_parameters['two'] = 2 self._check_matching(jc)
def test_non_empty(self): jc = JobConfig(job_name='TestIngester') jc.comment = 'Test configuration' jc.target_pe_count = 2 jco = self._check_overlays(jc) self.assertIn('jobConfig', jco) self.assertIn('jobName', jco['jobConfig']) self.assertEqual('TestIngester', jco['jobConfig']['jobName'])
def test_non_empty(self): jc = JobConfig(job_name='TestIngester') jc.comment = 'Test configuration' jc.target_pe_count = 2 jco = self._check_overlays(jc) self.assertIn('jobConfig', jco) self.assertIn('jobName', jco['jobConfig']) self.assertEqual('TestIngester', jco['jobConfig']['jobName'])
def test_from_overlays(self): self._check_matching(JobConfig()) jc = JobConfig(job_name='TestIngester', preload=True, data_directory='/tmp/a', job_group='gg', tracing='info') jc.comment = 'Test configuration' jc.target_pe_count = 2 self._check_matching(jc) jc = JobConfig(job_name='TestIngester2') jc.comment = 'Test configuration2' self._check_matching(jc) jc = JobConfig(preload=True) jc.raw_overlay = {'a': 34} self._check_matching(jc) jc = JobConfig(preload=True) jc.raw_overlay = {'x': 'fff'} jc.submission_parameters['one'] = 1 jc.submission_parameters['two'] = 2 self._check_matching(jc)
def test_comment(self): jc = JobConfig() jc.comment = 'Test configuration' self.assertEqual('Test configuration', jc.comment) self._check_overlays(jc)
def test_comment(self): jc = JobConfig() jc.comment = 'Test configuration' self.assertEqual('Test configuration', jc.comment) self._check_overlays(jc)