Exemplo n.º 1
0
 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
Exemplo n.º 2
0
    def test_localhost(self):
        try:
            host=Host(config_file, 'clutch')
        except Excption:
            self.fail('clutch not found')

        self.assertEquals(host.get('n_procs'), '2')
Exemplo n.º 3
0
 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
Exemplo n.º 4
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
Exemplo n.º 5
0
    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)
Exemplo n.º 6
0
 def test_graph(self):
     buffy = Host(hostname='buffy')
     p = Pipeline('test_graph', buffy, root)
Exemplo n.º 7
0
 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)
Exemplo n.º 8
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
Exemplo n.º 9
0
 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)