def _test_missing_key(self): host=Host(config_file, 'clutch') try: self.assertEqual(host.environ('imaginary_key'), '/usr/local/lib') # key provided self.fail() except ConfigParser.NoOptionError: pass
def test_localhost(self): try: host=Host(config_file, 'clutch') except Excption: self.fail('clutch not found') self.assertEquals(host.get('n_procs'), '2')
def _test_missing_key(self): host = Host(config_file, 'clutch') try: self.assertEqual(host.environ('imaginary_key'), '/usr/local/lib') # key provided self.fail() except ConfigParser.NoOptionError: pass
def _test_environ(self): host = Host(config_file, 'clutch') environ = host.environ() self.assertEqual(environ['ld_library_path'], '/usr/local/lib') # no key provided self.assertEqual(host.environ('ld_library_path'), '/usr/local/lib') # key provided
def test_variant_splitter(self): host=Host(hostname=self.args.host) pipeline=Pipeline('mock', host, working_dir, True) data_basename='data/rawdata/1047-COPD.10K' variants_fn='data/trip_neg_Vic/triple_negativ_mut_seq' output_dir=os.path.join(root_dir, 't', 'fixtures', 'var2reads') cmd=RunVariantSplitter(pipeline, data_basename, variants_fn, output_dir) cmd=cmd.cmd_string() print cmd self.assertIn(host.get('variant_splitter.script'), cmd) self.assertIn(data_basename, cmd) self.assertIn(variants_fn, cmd)
def test_graph(self): buffy = Host(hostname='buffy') p = Pipeline('test_graph', buffy, root)
def test_empty_environ(self): host=Host(config_file, 'imaginary_host') self.assertEqual(str(host), 'imaginary_host') env=host.environ() self.assertEqual(type(env), type({})) self.assertEqual(len(env), 0)
def _test_environ(self): host=Host(config_file, 'clutch') environ=host.environ() self.assertEqual(environ['ld_library_path'], '/usr/local/lib') # no key provided self.assertEqual(host.environ('ld_library_path'), '/usr/local/lib') # key provided
def test_empty_environ(self): host = Host(config_file, 'imaginary_host') self.assertEqual(str(host), 'imaginary_host') env = host.environ() self.assertEqual(type(env), type({})) self.assertEqual(len(env), 0)