Exemplo n.º 1
0
 def test_main_neitherFileNorDirectory(self):
     """ Test for invalid input paths """
     # Build
     inputFileA = "someStuff"
     inputFileB = "otherStuff"
     self.isFile = False
     self.isDirectory = False
     # Operate & Check
     with self.assertRaises(TypeError):
         comline.mainOld(inputFileA, inputFileB)
Exemplo n.º 2
0
 def test_main_noArguments(self):
     """ Test for call of main without arguments """
     # Build
     self.isFile = False
     self.isDirectory = True
     self.expected_inA = "./input/A"
     self.expected_inB = "./input/B"
     self.expected_out = "./output"
     # Operate & Check
     with self.assertRaises(self.MockTwoFoldersCalled):
         comline.mainOld()
Exemplo n.º 3
0
 def test_main_singleFileNoOutput(self):
     """ Test for single file without output files """
     # Build
     inputFileA = "someFolder/fake.rs3"
     inputFileB = "otherFolder/alsofake.rs3"
     self.isFile = True
     self.isDirectory = False
     self.expected_inA = inputFileA
     self.expected_inB = inputFileB
     self.expected_outRelA = ""
     self.expected_outRelB = ""
     self.expected_outComp = ""
     # Operate & Check
     with self.assertRaises(self.MockSingleFolderCalled):
         comline.mainOld(inputFileA, inputFileB)
Exemplo n.º 4
0
 def test_main_singleFileFullOutput(self):
     """ Test for single file with full output,
         i.e. relation tables & comparison table """
     # Build
     inputFileA = "someFolder/fake.rs3"
     inputFileB = "otherFolder/alsofake.rs3"
     outputCompTable = "againSomeFolder/fakeComp.csv"
     outputRelA = "adf/relTableA.csv"
     outputRelB = "a23/relTableB.csv"
     self.isFile = True
     self.isDirectory = False
     self.expected_inA = inputFileA
     self.expected_inB = inputFileB
     self.expected_outRelA = outputRelA
     self.expected_outRelB = outputRelB
     self.expected_outComp = outputCompTable
     # Operate & Check
     with self.assertRaises(self.MockSingleFolderCalled):
         comline.mainOld(inputFileA,
                         inputFileB,
                         outputCompTable,
                         outputRelA,
                         outputRelB)