From dff9f5cd82be21a52f6fa0849a2e52c74dbd43c4 Mon Sep 17 00:00:00 2001 From: Frh Date: Mon, 6 Apr 2020 18:41:10 -0700 Subject: [PATCH] Further linting fixes flagged by DeepSource --- tests/data.py | 3 ++- tests/test_common.py | 17 +++++++---------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/tests/data.py b/tests/data.py index 77d407e..679c35c 100755 --- a/tests/data.py +++ b/tests/data.py @@ -838,7 +838,8 @@ data_stream_two_tables_1 = [ "2,330 .9", ], [ - "Violent crime . . . . . . . .\n . .\n . .\n . .\n . .\n . .", + "Violent crime . . . . . . . .\n . .\n . .\n . .\n" \ + " . .\n . .", "467 .9", "69 .1", "398 .8", diff --git a/tests/test_common.py b/tests/test_common.py index 120e4bd..375e43a 100644 --- a/tests/test_common.py +++ b/tests/test_common.py @@ -180,6 +180,8 @@ def test_stream_layout_kwargs(): def test_stream_vertical_header(): + """Tests a complex table inclusive of vertically aligned header. + """ df = pd.DataFrame(data_stream_vertical_headers) filename = os.path.join(testdir, "vertical_header.pdf") @@ -274,8 +276,7 @@ def test_repr(): assert repr(tables) == "" assert repr(tables[0]) == "" assert ( - repr(tables[0].cells[0][0]) - == "" + repr(tables[0].cells[0][0]) == "" ) @@ -285,24 +286,21 @@ def test_pages(): assert repr(tables) == "" assert repr(tables[0]) == "
" assert ( - repr(tables[0].cells[0][0]) - == "" + repr(tables[0].cells[0][0]) == "" ) tables = camelot.read_pdf(url, pages="1-end") assert repr(tables) == "" assert repr(tables[0]) == "
" assert ( - repr(tables[0].cells[0][0]) - == "" + repr(tables[0].cells[0][0]) == "" ) tables = camelot.read_pdf(url, pages="all") assert repr(tables) == "" assert repr(tables[0]) == "
" assert ( - repr(tables[0].cells[0][0]) - == "" + repr(tables[0].cells[0][0]) == "" ) @@ -312,8 +310,7 @@ def test_url(): assert repr(tables) == "" assert repr(tables[0]) == "
" assert ( - repr(tables[0].cells[0][0]) - == "" + repr(tables[0].cells[0][0]) == "" )