Esempio n. 1
0
 def test_get_item_operator(self):
     r = p.SeriesReader(self.testfile, series=4)
     value = r[0, 1]
     assert value == 2
Esempio n. 2
0
 def test_headers(self):
     r = p.SeriesReader(self.testfile, series=4)
     actual = r.colnames
     eq_(self.content[4], actual)
Esempio n. 3
0
 def test_named_column_at(self):
     r = p.SeriesReader(self.testfile, series=4)
     result = r.named_column_at("X")
     actual = {"X": [1, 1, 1, 1, 1]}
     eq_(result, actual["X"])
Esempio n. 4
0
 def test_content_is_read(self):
     r = p.SeriesReader(self.testfile, series=4)
     actual = list(r.rows())
     self.content.pop(4)
     eq_(self.content, actual)
Esempio n. 5
0
 def test_headers(self):
     r = p.SeriesReader(self.testfile)
     actual = r.colnames
     assert self.content[0] == actual
Esempio n. 6
0
 def test_content_is_read(self):
     r = p.SeriesReader(self.testfile)
     actual = list(r.rows())
     assert self.content[1:] == actual
Esempio n. 7
0
 def test_set_named_column_at(self):
     r = pe.SeriesReader(self.testfile)
     r.set_named_column_at("b", [11, 1])
     eq_(r.column_at(1), [11, 1])
Esempio n. 8
0
 def test_non_default_sheet_as_single_sheet_reader_series(self):
     r = pe.SeriesReader(self.testfile, "Sheet3")
     data = pe.utils.to_array(r.rows())
     assert data == self.content["Sheet3"][1:]