Coverage for tests/test_tool.py: 91%
9 statements
« prev ^ index » next coverage.py v7.2.7, created at 2023-08-08 15:01 +0200
« prev ^ index » next coverage.py v7.2.7, created at 2023-08-08 15:01 +0200
1import json
2from textwrap import dedent
4from bq_tabulate import tool
7def test_arithmetic():
8 with open("tests/example.json") as infile: 8 ↛ 10line 8 didn't jump to line 10
9 example_json = json.load(infile)
10 actual = tool.bq_tabulate(example_json)
11 expected = dedent(
12 """\
13 category f0_
14 --------------- -----------
15 family 15681705594
16 standard 13754806819
17 ad-supported 9553476042
18 trial-opt-out 7050298030
19 duo 6826200648
20 campaign 4218297356
21 student 3639993696
22 trial-opt-in 2338638547
23 iap 1573221041
24 bundle 1087830904
25 non-subscriber 615196940
26 premium-mini 96730190
27 paygtorecurring 18341966
28 basic 8765048
29 spotify-plus 8303007
30 unknown 1158804"""
31 )
32 assert actual == expected