コード例 #1
0
class TestTargetExtractor(TestCase):
    def setUp(self):
        self.sut = TargetExtractor(re.compile(DEFAULT_FILE_REGEX))

    def test_it_extracts_the_correct_strings_from_the_filename(self):
        self.assertEquals(("System", "App", "Model"), self.sut.extract("System_App_Model.csv"))
        self.assertEquals(("System", "App", "Model"), self.sut.extract("System_App_Model_1234.csv"))
        self.assertEquals(("ABCabc123", "App", "Model"), self.sut.extract("ABCabc123_App_Model.csv"))
コード例 #2
0
class TestTargetExtractor(TestCase):
    def setUp(self):
        self.sut = TargetExtractor(re.compile(DEFAULT_FILE_REGEX))

    def test_it_extracts_the_correct_strings_from_the_filename(self):
        self.assertEquals(('System', 'App', 'Model'),
                          self.sut.extract('System_App_Model.csv'))
        self.assertEquals(('System', 'App', 'Model'),
                          self.sut.extract('System_App_Model_1234.csv'))
        self.assertEquals(('ABCabc123', 'App', 'Model'),
                          self.sut.extract('ABCabc123_App_Model.csv'))
コード例 #3
0
 def setUp(self):
     self.sut = TargetExtractor(re.compile(DEFAULT_FILE_REGEX))
コード例 #4
0
 def setUp(self):
     self.sut = TargetExtractor(re.compile(DEFAULT_FILE_REGEX))