| Author | SHA1 | Message | Date |
|---|---|---|---|
|
|
c2d5c621c0 | Making test part of the module | 1 year ago |
| @@ -8,8 +8,6 @@ authors = [ | |||||
| description = "Dora Node for plotting text and bbox on image with OpenCV" | description = "Dora Node for plotting text and bbox on image with OpenCV" | ||||
| readme = "README.md" | readme = "README.md" | ||||
| packages = [{ include = "opencv_plot" }] | |||||
| [tool.poetry.dependencies] | [tool.poetry.dependencies] | ||||
| dora-rs = "^0.3.6" | dora-rs = "^0.3.6" | ||||
| numpy = "< 2.0.0" | numpy = "< 2.0.0" | ||||
| @@ -18,6 +16,7 @@ python = "^3.7" | |||||
| [tool.poetry.scripts] | [tool.poetry.scripts] | ||||
| opencv-plot = "opencv_plot.main:main" | opencv-plot = "opencv_plot.main:main" | ||||
| opencv-plot-test = "opencv_plot.tests.test_opencv_plot:main" | |||||
| [build-system] | [build-system] | ||||
| requires = ["poetry-core>=1.8.0"] | requires = ["poetry-core>=1.8.0"] | ||||
| @@ -1,9 +0,0 @@ | |||||
| import pytest | |||||
| def test_import_main(): | |||||
| from opencv_plot.main import main | |||||
| # Check that everything is working, and catch dora Runtime Exception as we're not running in a dora dataflow. | |||||
| with pytest.raises(RuntimeError): | |||||
| main() | |||||
| @@ -7,3 +7,8 @@ def test_import_main(): | |||||
| # Check that everything is working, and catch dora Runtime Exception as we're not running in a dora dataflow. | # Check that everything is working, and catch dora Runtime Exception as we're not running in a dora dataflow. | ||||
| with pytest.raises(RuntimeError): | with pytest.raises(RuntimeError): | ||||
| main() | main() | ||||
| if __name__ == "__main__": | |||||
| # Call pytest.main() to run tests | |||||
| pytest.main(["-s", "-v"]) | |||||