Skip to main content

test: cover normal behavior and edge cases

GBB Demo authored on Nov 2, 2026

parent 05d24d3commit 31bf16ed5a2e

1 file changed, +14 −0

  • test_app.py+14 −0
    @@ -1,0 +1,14 @@
    1+import unittest
    2+import app
    3+
    4+class ApplicationTests(unittest.TestCase):
    5+ def test_summary(self):
    6+ self.assertEqual(app.summarize([])["count"], 0)
    7+ self.assertEqual(app.summarize(range(1, 101))["p95"], 95)
    8+ self.assertEqual(app.summarize([10, 20, 30])["mean"], 20)
    9+ with self.assertRaises(ValueError):
    10+ app.summarize([float("nan")])
    11+
    12+
    13+if __name__ == "__main__":
    14+ unittest.main()