def test_004_EmptyDictionary(self): """ readGraphTest_004_EmptyDictionary: Test the case EmptyDictionary where file contains only the ":" delimiter. Should return an empty dictionary """ # Single ":" delimiter on a line self.assertEqual(xayacore.readGraph('/XAYA/devcore/test/test_emptydictionary.txt'),{'': ['']}) # Multiple "." delimiters on a line self.assertEqual(xayacore.readGraph('/XAYA/devcore/test/test_emptydictionary2.txt'),{'': ['']}) # Multiple ":" delimiters on several lines self.assertEqual(xayacore.readGraph('/XAYA/devcore/test/test_emptydictionary3.txt'),{'': ['']})
def test_002_NoFile(self): """ readGraphTest_002_NoFile: Test the case NoFile where the file doesn't exist at the location""" self.assertEqual(xayacore.readGraph("/bad/path/to/no/file"),'File not opened, could not find/bad/path/to/no/file')
def test_003_EmptyFile(self): """ readGraphTest_003_EmptyFile: Test the case EmpytFile to see if the input file was empty, i.e. returns an empty dict""" self.assertEqual(xayacore.readGraph("/XAYA/devcore/test/test_emptyfile.txt"),{})
def test_001_NormalCase(self): """ readGraphTest_001_NormalCase: Tests the Normal Case with a XAYA format ascii file""" self.assertEqual(xayacore.readGraph("/XAYA/devcore/test/test_DataDictionary_X001.txt"), {'StandStructureID': ['1', ''], 'PolygonID': ['1', ''], 'StandStructureDescription': ['']})