コード例 #1
0
 def test_class_name(self):
     e = Extractor()
     expected = True
     e._data_extraction("./mammals.py")
     if e.component_dict:
         actual = True
     else:
         actual = False
     self.assertEqual(actual, expected)
コード例 #2
0
 def test_attribute_declared(self):
     e = Extractor()
     # Arrange
     expected = True
     # Act
     e._data_extraction("./component.py")
     if e.component_dict:
         actual = True
     else:
         actual = False
     # Assert
     self.assertEqual(actual, expected)
コード例 #3
0
 def test_extractor_class_get_function(self):
     """Ensure that getter can retrieve a dictionary"""
     e = Extractor()
     e._data_extraction("./tests/test_class_5.py")
     dictionary = e.get_component_dictionary()
     self.assertTrue(dictionary)