diff options
author | Damien George <damien@micropython.org> | 2023-02-16 10:27:10 +1100 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2023-02-16 10:38:38 +1100 |
commit | 177ae2f346b840f6e10dffc41e9cd1e47c9c9c1b (patch) | |
tree | 48892a39d6ca571c49a33b5ff9e81468e3ee7781 /tests/float/math_domain_special.py | |
parent | 799d88818232a1c73095e848c116170d7db1852e (diff) | |
download | micropython-177ae2f346b840f6e10dffc41e9cd1e47c9c9c1b.tar.gz micropython-177ae2f346b840f6e10dffc41e9cd1e47c9c9c1b.zip |
tests/float: Make output of math function tests more readable.
By explicitly naming the function, its arguments, and result.
Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'tests/float/math_domain_special.py')
-rw-r--r-- | tests/float/math_domain_special.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/float/math_domain_special.py b/tests/float/math_domain_special.py index 880594dce2..ddabf178a3 100644 --- a/tests/float/math_domain_special.py +++ b/tests/float/math_domain_special.py @@ -29,9 +29,9 @@ for name, f, args in ( ): for x in args + (inf, -inf, nan): try: - ans = f(x) - print("%.4f" % ans) + ans = "%.4f" % f(x) except ValueError: - print(name, "ValueError") + ans = "ValueError" except OverflowError: - print(name, "OverflowError") + ans = "OverflowError" + print("%s(%.4f) = %s" % (name, x, ans)) |