def test_extract_parents_without_parent(self): e = Extractor().comp_ext expected = "" line = 'Example(Test1)' # Act actual = e._extract_parents(line) # Assert self.assertEqual(expected, actual)
def test_multiple_dependency_extraction(self): e = Extractor().comp_ext # Arrange expected = ["Test1", "Test2", "Test3"] line = 'class Example(Test1, Test2, Test3)' # Act actual = e._extract_parents(line) # Assert self.assertEqual(expected, actual)
def test_object_only_dependency_(self): """Does not extract 'object' if it is only dependency""" e = Extractor().comp_ext # Arrange expected = [] line = 'class Example(object)' # Act actual = e._extract_parents(line) # Assert self.assertEqual(expected, actual)
def test_single_dependency_extraction(self): """Extracts a single object that class inherits from""" e = Extractor().comp_ext # Arrange expected = ["Test1"] line = 'class Example(Test1)' # Act actual = e._extract_parents(line) # Assert self.assertEqual(expected, actual)