|
|
|
@ -21,6 +21,7 @@ def test_skip_empty_lines():
@@ -21,6 +21,7 @@ def test_skip_empty_lines():
|
|
|
|
|
ExcelRow(3, [""]), |
|
|
|
|
ExcelRow(4, ["two"]), |
|
|
|
|
ExcelRow(5, [""]), |
|
|
|
|
ExcelRow(5, ["sTanD:"]), |
|
|
|
|
] |
|
|
|
|
|
|
|
|
|
result = _skip_some_lines(rows) |
|
|
|
@ -54,12 +55,12 @@ def test_parse_budget_data(budget_example_sheet):
@@ -54,12 +55,12 @@ def test_parse_budget_data(budget_example_sheet):
|
|
|
|
|
result = parse_budget_data(budget_example_sheet) |
|
|
|
|
first, last = result[0], result[-1] |
|
|
|
|
|
|
|
|
|
assert len(result) == 20 |
|
|
|
|
assert len(result) == 19 # the line starting with "Stand" is filtered out |
|
|
|
|
assert first.row == 3 |
|
|
|
|
assert first.number == 1 |
|
|
|
|
assert first.project_name == "Safeguard IV" |
|
|
|
|
assert first.rest == "=F3-G3" |
|
|
|
|
assert last.row == 61 |
|
|
|
|
assert last.row == 57 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def test_parse_budget_file(budget_example_file): |
|
|
|
@ -68,7 +69,7 @@ def test_parse_budget_file(budget_example_file):
@@ -68,7 +69,7 @@ def test_parse_budget_file(budget_example_file):
|
|
|
|
|
result = parse_budget_file(budget_example_file) |
|
|
|
|
first = result[0] |
|
|
|
|
|
|
|
|
|
assert len(result) == 20 |
|
|
|
|
assert len(result) == 19 # the line starting with "Stand" is filtered out |
|
|
|
|
assert first.row == 3 |
|
|
|
|
assert first.number == 1 |
|
|
|
|
assert first.project_name == "Safeguard IV" |
|
|
|
|