Ejemplo n.º 1
0
 def test_normal_sub_with_match_tokens(self):
     match_key = MatchKey('', [], [])
     subbed_in = match_key._normal_sub('test %M %s',
       ['this'])
     self.assertEquals(subbed_in, 'test %M this')
Ejemplo n.º 2
0
 def test_normal_sub_no_match_tokens(self):
     match_key = MatchKey('', [], [])
     subbed_in = match_key._normal_sub('test %s %s',
       ['and', 'this'])
     self.assertEquals(subbed_in, 'test and this')
Ejemplo n.º 3
0
 def test_normal_sub_no_sub(self):
     match_key = MatchKey('', [], [])
     subbed_in = match_key._normal_sub('test', [])
     self.assertEquals(subbed_in, 'test')
Ejemplo n.º 4
0
 def test_normal_sub_with_match_tokens(self):
     match_key = MatchKey('', [], [])
     subbed_in = match_key._normal_sub('test %M %s', ['this'])
     self.assertEquals(subbed_in, 'test %M this')
Ejemplo n.º 5
0
 def test_normal_sub_no_match_tokens(self):
     match_key = MatchKey('', [], [])
     subbed_in = match_key._normal_sub('test %s %s', ['and', 'this'])
     self.assertEquals(subbed_in, 'test and this')
Ejemplo n.º 6
0
 def test_normal_sub_no_sub(self):
     match_key = MatchKey('', [], [])
     subbed_in = match_key._normal_sub('test', [])
     self.assertEquals(subbed_in, 'test')