Esempio n. 1
0
    def test_s_option(self):
        self.args = parse_cmd(['-s', '1', '2', '4', '-p', 'test_property', '-f', 'test.h5'])
        self.assertEqual(self.args.h5f, 'test.h5')
        self.assertEqual(self.args.ppty, 'test_property')

        self.assertEqual(self.args.SEQS, ['sq1', 'sq2', 'sq4'])

        self.args = parse_cmd(['-s', '1-4', '-p', 'test_property', '-f', 'test.h5'])
        self.assertEqual(self.args.h5f, 'test.h5')
        self.assertEqual(self.args.ppty, 'test_property')

        self.assertEqual(self.args.SEQS, ['sq1', 'sq2', 'sq3', 'sq4'])
        
        self.args = parse_cmd(['-s', '1-4', '39', '-p', 'test_property', '-f', 'test.h5'])
        self.assertEqual(self.args.h5f, 'test.h5')
        self.assertEqual(self.args.ppty, 'test_property')

        self.assertEqual(self.args.SEQS, ['sq1', 'sq2', 'sq3', 'sq4', 'sq39'])
Esempio n. 2
0
    def test_n_option(self):
        self.args = parse_cmd(['-n', '1', '2', '10', '20', '-p', 'test_property', '-f', 'test.h5'])
        self.assertEqual(self.args.h5f, 'test.h5')
        self.assertEqual(self.args.ppty, 'test_property')

        self.assertEqual(self.args.NUMS, ['01', '02', '10', '20'])
        
        self.args = parse_cmd(['-n', '1-4', '-p', 'test_property', '-f', 'test.h5'])
        self.assertEqual(self.args.h5f, 'test.h5')
        self.assertEqual(self.args.ppty, 'test_property')

        self.assertEqual(self.args.NUMS, ['01', '02', '03', '04'])

        self.args = parse_cmd(['-n', '1-4', '10', '20', '-p', 'test_property', '-f', 'test.h5'])
        self.assertEqual(self.args.h5f, 'test.h5')
        self.assertEqual(self.args.ppty, 'test_property')

        self.assertEqual(self.args.NUMS, ['01', '02', '03', '04', '10', '20'])
Esempio n. 3
0
 def test_p_option(self):
     self.args = parse_cmd(['-p', 'test_property', '-p', 'test_property', '-f', 'test.h5'])
     self.assertEqual(self.args.h5f, 'test.h5')
     self.assertEqual(self.args.ppty, 'test_property')
Esempio n. 4
0
    def test_t_option(self):
        self.args = parse_cmd(['-t', '300', '700', '-p', 'test_property', '-f', 'test.h5'])
        self.assertEqual(self.args.h5f, 'test.h5')
        self.assertEqual(self.args.ppty, 'test_property')

        self.assertEqual(self.args.TMPS, ['300', '700'])
Esempio n. 5
0
    def test_c_option(self):
        self.args = parse_cmd(['-c', 'w', 'm', 'e', '-p', 'test_property', '-f', 'test.h5'])
        self.assertEqual(self.args.h5f, 'test.h5')
        self.assertEqual(self.args.ppty, 'test_property')

        self.assertEqual(self.args.CDTS, ['w', 'm', 'e'])