Skip to content

Commit 4706676

Browse files
committed
update test cases
1 parent 2e565ae commit 4706676

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
lines changed

casparser/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@
99
"CapitalGainsReport",
1010
]
1111

12-
__version__ = "0.7.1"
12+
__version__ = "0.7.2"

casparser/parsers/pdfminer.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,12 @@ def group_similar_rows(elements_list: List[Iterator[LTTextBoxHorizontal]]):
9393
y0, y1 = sorted_elements[0].y0, sorted_elements[0].y1
9494
items = []
9595
for el in sorted_elements:
96-
if len(items) > 0 and not (is_close(el.y1, y1, tol=3) or is_close(el.y0, y0, tol=3)):
96+
if len(items) > 0 and not (
97+
is_close(el.y1, y1, tol=3)
98+
or is_close(el.y0, y0, tol=3)
99+
or is_close(el.y1, y0, tol=2)
100+
or is_close(el.y0, y1, tol=2)
101+
):
97102
line = "\t\t".join(
98103
[x.get_text().strip() for x in sorted(items, key=lambda x: x.x0)]
99104
)

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ build-backend = "poetry.core.masonry.api"
5050

5151
[tool.pytest.ini_options]
5252
minversion = "7.0"
53-
addopts = "--cov=casparser --cov-report=xml --cov-report=html"
53+
addopts = "--cov=casparser --cov-report=xml --cov-report=html --exitfirst"
5454
testpaths = [
5555
"tests",
5656
]

tests/base.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ def test_output_json(self):
5151
for scheme in folio.get("schemes", []):
5252
assert scheme["isin"] is not None
5353
assert scheme["amfi"] is not None
54+
assert scheme["advisor"] not in (None, "ARN")
5455
assert data.get("investor_info", {}).get("mobile") not in (None, "")
5556
assert data["cas_type"] == CASFileType.DETAILED.value
5657

0 commit comments

Comments
 (0)