Beispiel #1
0
 def test_big_filter(self):
     arra = open('tests/arra.csv')
     t = TableFu(arra)
     f = t.filter(State='ALABAMA', County='COLBERT')
     self.assertEqual(f.count(), 5)
Beispiel #2
0
 def test_simple_filter(self):
     "Filter by keyword args"
     t = TableFu(self.csv_file)
     f = t.filter(Author='Samuel Beckett')
     self.assertEqual(f[0].cells, self.table[1])
Beispiel #3
0
 def test_multi_filter(self):
     "Filter by multiple keywords"
     t = TableFu(self.csv_file)
     f = t.filter(Style='Modernism', Author='Samuel Beckett')
     self.assertEqual(f[0].cells, self.table[1])
Beispiel #4
0
 def test_filter(self):
     "Filtering returns a new TableFu instance"
     t = TableFu(self.csv_file)
     f = t.filter(Author='Samuel Beckett')
     self.assertEqual(type(t), type(f))
     self.assertEqual(t.columns, f.columns)
Beispiel #5
0
 def test_big_filter(self):
     arra = open('tests/arra.csv')
     t = TableFu(arra)
     f = t.filter(State='ALABAMA', County='COLBERT')
     self.assertEqual(f.count(), 5)
Beispiel #6
0
 def test_multi_filter(self):
     "Filter by multiple keywords"
     t = TableFu(self.csv_file)
     f = t.filter(Style='Modernism', Author='Samuel Beckett')
     self.assertEqual(f[0].cells, self.table[1])
Beispiel #7
0
 def test_simple_filter(self):
     "Filter by keyword args"
     t = TableFu(self.csv_file)
     f = t.filter(Author='Samuel Beckett')
     self.assertEqual(f[0].cells, self.table[1])
Beispiel #8
0
 def test_filter(self):
     "Filtering returns a new TableFu instance"
     t = TableFu(self.csv_file)
     f = t.filter(Author='Samuel Beckett')
     self.assertEqual(type(t), type(f))
     self.assertEqual(t.columns, f.columns)