From 11712a5d8bdab4d22f8b34e679a6736b14161db0 Mon Sep 17 00:00:00 2001 From: Tanay Manerikar Date: Tue, 23 Jul 2024 21:03:29 +0530 Subject: [PATCH] Added assert to test --- integration_tests/class_03.py | 7 +++++-- tests/tests.toml | 4 ---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/integration_tests/class_03.py b/integration_tests/class_03.py index a7a7844067..8e4d9eded6 100644 --- a/integration_tests/class_03.py +++ b/integration_tests/class_03.py @@ -13,9 +13,12 @@ def circle_print(self:"Circle"): print("Circle: r = ",str(self.radius)," area = ",str(area)) def main(): - c : Circle = Circle(1.0) - c.circle_print() + c : Circle = Circle(1.0) + c.circle_print() + assert abs(c.circle_area() - 3.141593) <= 1e-6 c.radius = 1.5 c.circle_print() + assert abs(c.circle_area() - 7.068583) < 1e-6 + if __name__ == "__main__": main() diff --git a/tests/tests.toml b/tests/tests.toml index 9299c7b290..fb5909d0fe 100644 --- a/tests/tests.toml +++ b/tests/tests.toml @@ -361,10 +361,6 @@ asr = true pass = "class_constructor" cumulative = true -[[test]] -filename = "../integration_tests/class_03.py" -run = true - [[test]] filename = "../integration_tests/callback_01.py" asr = true