コード例 #1
0
 def test_never(self):
     with pytest.raises(heartbeat.FlicNotFoundError):
         with open('./sample_darkstat_html/never.html', 'r') as html_file:
             html = html_file.read()
             heartbeat.parse_darkstat_html_lines(html.splitlines())
コード例 #2
0
 def test_seconds(self):
     with open('./sample_darkstat_html/59_secs.html', 'r') as html_file:
         html = html_file.read()
         assert heartbeat.parse_darkstat_html_lines(html.splitlines()) == 59
コード例 #3
0
 def test_empty_html(self):
     with pytest.raises(heartbeat.FlicNotFoundError):
         heartbeat.parse_darkstat_html_lines(['', '', ''])