kunit: tool: make TestCounts a dataclass
authorDaniel Latypov <dlatypov@google.com>
Thu, 3 Nov 2022 17:47:38 +0000 (10:47 -0700)
committerShuah Khan <skhan@linuxfoundation.org>
Mon, 12 Dec 2022 21:13:47 +0000 (14:13 -0700)
commitf473dd9488d910aab109e8c6a2e4181125ca322a
tree611c846a1f883dcf850a081d62a68942ba33fad4
parentf19dd011d8de6f0c1d20abea5158aa4f5d9cea44
kunit: tool: make TestCounts a dataclass

Since we're using Python 3.7+, we can use dataclasses to tersen the
code.

It also lets us create pre-populated TestCounts() objects and compare
them in our unit test. (Before, you could only create empty ones).

Signed-off-by: Daniel Latypov <dlatypov@google.com>
Reviewed-by: David Gow <davidgow@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/testing/kunit/kunit_parser.py
tools/testing/kunit/kunit_tool_test.py