[MRG + 1] Add tests for repr (#128)

* add tests for repr

* remove repr for Cell

* add round for repr of Cell

* change decimal places to 2

* change tests for 2 decimal places
This commit is contained in:
Vaibhav Mule
2018-10-05 20:19:24 +05:30
committed by Vinayak Mehta
parent f13337d50a
commit c53ea795fd
2 changed files with 9 additions and 1 deletions
+8
View File
@@ -138,3 +138,11 @@ def test_lattice_shift_text():
tables = camelot.read_pdf(filename, line_size_scaling=40, shift_text=['r', 'b'])
assert df_rb.equals(tables[0].df)
def test_repr():
filename = os.path.join(testdir, "foo.pdf")
tables = camelot.read_pdf(filename)
assert repr(tables) == "<TableList n=1>"
assert repr(tables[0]) == "<Table shape=(7, 7)>"
assert repr(tables[0].cells[0][0]) == "<Cell x1=120.48 y1=218.42 x2=164.64 y2=233.89>"