Skip to content

Commit fc751a4

Browse files
committed
add example tests
1 parent 6613453 commit fc751a4

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import pytest
2+
import numpy as np
3+
4+
5+
# example_test.py
6+
def test_add_numbers():
7+
result = np.add(2, 3)
8+
assert result == 5
9+
10+
11+
def test_empty_list():
12+
my_list = []
13+
assert len(my_list) == 0
14+
assert not my_list
15+
16+
17+
@pytest.fixture
18+
def sample_data():
19+
return {"name": "Test", "value": 42}

0 commit comments

Comments
 (0)