We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 033a3f3 commit 6fc51deCopy full SHA for 6fc51de
data_science_tools/marimo_examples/test_example.py
@@ -0,0 +1,42 @@
1
+import marimo
2
+
3
+__generated_with = "0.13.6"
4
+app = marimo.App(width="medium")
5
6
7
+@app.cell
8
+def _():
9
+ import pytest
10
11
+ return (pytest,)
12
13
14
+@app.function
15
+def add_numbers(a, b):
16
+ """Return the sum of two numbers."""
17
+ return a + b
18
19
20
21
+def test_add_numbers():
22
+ assert add_numbers(2, 3) == 5
23
24
25
26
+def _(pytest):
27
+ @pytest.mark.parametrize(
28
+ "a, b, expected",
29
+ [
30
+ (2, 3, 5),
31
+ (-1, 1, 0),
32
+ (0, 0, 0),
33
+ ],
34
+ )
35
+ def test_multiple_add_numbers(a, b, expected):
36
+ assert add_numbers(a, b) == expected
37
38
+ return
39
40
41
+if __name__ == "__main__":
42
+ app.run()
0 commit comments