Example #1
0
 def test_sweepFiles_fileNotDirectory(self):
         with self.assertRaises(IOError):
         io.sweepFiles('phylodist/test.py')
 def test_sweepFiles_nonExistentDir(self):
     with self.assertRaises(IOError):
         io.sweepFiles('directory_does_not_exist')
 def test_sweepFiles_directoryType(self):
     with self.assertRaises(TypeError):
         io.sweepFiles(42)
 def test_sweepFiles_metadataType(self):
     with self.assertRaises(TypeError):
         io.sweepFiles('examples', metadata=41)
 def test_sweepFiles_values(self):
     pdSD = io.sweepFiles('examples')
     # check the length of the dictionary
     self.assertEquals(len(pdSD), 2)
     # verify the sample key names are correct
     for key in pdSD.keys():
         self.assertIn(key, ['LakWasMeta9_HOW4', 'LakWasMeta9_HOW4_2'])
     # spot check specific values in the dictionary's data frame
     self.assertEquals(
         pdSD['LakWasMeta9_HOW4'].at[97, 'locus_tag'], 'Ga0066407_15607121'
     )
     self.assertEquals(
         pdSD['LakWasMeta9_HOW4_2'].at[1013, 'locus_tag'],
         'Ga0066495_1323232'
     )
Example #2
0
File: test.py Project: dacb/metacsp
 def test_sweepFiles_values(self):
     pdSD = io.sweepFiles('examples')
     # check the length of the dictionary
     self.assertEquals(len(pdSD), 2)
     # verify the sample key names are correct
     for key in pdSD.keys():
         self.assertIn(key, ['LakWasMeta9_HOW4', 'LakWasMeta9_HOW4_2'])
     # spot check specific values in the dictionary's data frame
     self.assertEquals(
         pdSD['LakWasMeta9_HOW4'].at[97, 'locus_tag'], 'Ga0066407_15607121'
     )
     self.assertEquals(
         pdSD['LakWasMeta9_HOW4_2'].at[1013, 'locus_tag'],
         'Ga0066495_1323232'
     )
Example #3
0
 def test_sweepFiles_values(self):
     pdSD = io.sweepFiles('examples')
     # check the length of the dictionary
     self.assertEquals(len(pdSD), 2)
     # verify the sample key names are correct
     for key in pdSD.keys():
         self.assertIn(key, ['LakWasMeta9_HOW4', 'LakWasMeta9_HOW4_2'])
     # spot check specific values in the dictionary's data frame
     self.assertEquals(
         pdSD['LakWasMeta9_HOW4'].at[97, 'locus_tag'], 'Ga0066407_15607121'
     )
     self.assertEquals(
         pdSD['LakWasMeta9_HOW4_2'].at[1013, 'locus_tag'],
         'Ga0066495_1323232'
     )
Example #4
0
File: test.py Project: dacb/metacsp
 def test_sweepFiles_metadataType(self):
     with self.assertRaises(TypeError):
         io.sweepFiles('examples', metadata=41)
Example #5
0
File: test.py Project: dacb/metacsp
 def test_sweepFiles_directoryType(self):
     with self.assertRaises(TypeError):
         io.sweepFiles(42)
Example #6
0
File: test.py Project: dacb/metacsp
 def test_sweepFiles_nonExistentDir(self):
     with self.assertRaises(IOError):
         io.sweepFiles('directory_does_not_exist')
Example #7
0
File: test.py Project: dacb/metacsp
 def test_sweepFiles_fileNotDirectory(self):
     with self.assertRaises(IOError):
         io.sweepFiles('phylodist/test.py')
Example #8
0
 def test_sweepFiles_metadataType(self):
     with self.assertRaises(TypeError):
         io.sweepFiles('examples', metadata=41)
Example #9
0
 def test_sweepFiles_directoryType(self):
     with self.assertRaises(TypeError):
         io.sweepFiles(42)
Example #10
0
 def test_sweepFiles_nonExistentDir(self):
     with self.assertRaises(IOError):
         io.sweepFiles('directory_does_not_exist')