Skip to content

Commit 15a35fb

Browse files
committed
converting tests to pytest
1 parent 3d04d1c commit 15a35fb

File tree

6 files changed

+20
-8
lines changed

6 files changed

+20
-8
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,5 @@ _build
77
_generate
88
build
99
dist/
10+
.pytest_cache/
11+
tmp/

Pipfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ name = "pypi"
88

99
[packages]
1010
pybind11 = "*"
11+
"e1839a8" = {path = ".", editable = true}
1112

1213
[dev-packages]
1314
pylama = "*"

Pipfile.lock

Lines changed: 5 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ python_example
33

44
An example project built with [pybind11](https://github.com/pybind/pybind11).
55

6-
DC: I am extending this with additional examples to explore specific data types
7-
that I need to manage in another project.
6+
This fork has been extended with additional examples to explore specific data types
7+
that are needed in another project.
88

99
Installation
1010
------------

tests/test.py

Lines changed: 0 additions & 5 deletions
This file was deleted.

tests/test_python_example.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import python_example as m
2+
3+
def test_version():
4+
assert m.__version__ == '0.0.1'
5+
6+
def test_add_1_2():
7+
assert m.add(1, 2) == 3
8+
9+
def test_subtract_1_2():
10+
assert m.subtract(1, 2) == -1

0 commit comments

Comments
 (0)