Skip to content
Snippets Groups Projects
Commit aacf7a83 authored by Kevin Scott's avatar Kevin Scott
Browse files

Added support for pytest and updated readme

parent 70613260
Branches
Tags
Loading
Pipeline #9724 passed
...@@ -88,6 +88,17 @@ python3 ...@@ -88,6 +88,17 @@ python3
>>> help(asic) >>> help(asic)
``` ```
## Running tests
### pytest
Run all tests against installed version off b_asic using a virtual enviroment
In `B-ASIC`:
```
python3 -m venv .venv
source .venv/bin/activate
pip install .
pytest
```
## License ## License
B-ASIC is distributed under the MIT license. B-ASIC is distributed under the MIT license.
See the included LICENSE file for more information. See the included LICENSE file for more information.
\ No newline at end of file
...@@ -70,7 +70,8 @@ setuptools.setup( ...@@ -70,7 +70,8 @@ setuptools.setup(
install_requires = [ install_requires = [
"pybind11>=2.3.0", "pybind11>=2.3.0",
"numpy", "numpy",
"install_qt_binding" "install_qt_binding",
"pytest==5.3.4"
], ],
packages = ["b_asic"], packages = ["b_asic"],
ext_modules = [CMakeExtension("b_asic")], ext_modules = [CMakeExtension("b_asic")],
......
from b_asic import InputPort
import pytest
@pytest.fixture
def outp_port():
return InputPort(0)
def test_port(outp_port):
assert outp_port.signals() == []
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment