100% coverage

This commit is contained in:
Daniil Fajnberg 2021-12-26 23:32:15 +01:00
parent a2f3f590f6
commit f29f22a52e
3 changed files with 6 additions and 7 deletions

View File

@ -8,3 +8,5 @@ omit =
fail_under = 100 fail_under = 100
show_missing = True show_missing = True
skip_covered = True skip_covered = True
exclude_lines =
if __name__ == .__main__.:

View File

@ -1,6 +0,0 @@
class WrongAssumptions(Exception):
pass
class UnexpectedMarkup(WrongAssumptions):
pass

View File

@ -52,8 +52,11 @@ class FunctionsTestCase(IsolatedAsyncioTestCase):
self.assertEqual(expected_output, output) self.assertEqual(expected_output, output)
def test_get_row_indent(self): def test_get_row_indent(self):
trs = self.test_soup.find_all('tr') mock_row = BeautifulSoup('<tr><div>foo</div></tr>', HTML_PARSER).tr
expected_output = 0 expected_output = 0
output = functions.get_row_indent(mock_row)
self.assertEqual(expected_output, output)
trs = self.test_soup.find_all('tr')
output = functions.get_row_indent(trs[0]) output = functions.get_row_indent(trs[0])
self.assertEqual(expected_output, output) self.assertEqual(expected_output, output)
for i, tr in enumerate(trs[1:], start=1): for i, tr in enumerate(trs[1:], start=1):