From fe61dadd0059a5dafc652f28a0f0574c404ebdfe Mon Sep 17 00:00:00 2001 From: Sietze van Buuren Date: Sun, 10 Nov 2024 15:44:47 +0100 Subject: [PATCH] test: Setup basic testing This commit sets up testing including one first basic test. Signed-off-by: Sietze van Buuren --- pyproject.toml | 6 ++++++ tests/__init__.py | 0 tests/basic_test.py | 15 +++++++++++++++ 3 files changed, 21 insertions(+) create mode 100644 tests/__init__.py create mode 100644 tests/basic_test.py diff --git a/pyproject.toml b/pyproject.toml index 9ef7ec8..d1d29c3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,6 +28,12 @@ dependencies = [ "pyopengl", ] +[dependency-groups] +dev = [ + "pylint", + "pytest", +] + [tool.setuptools.packages.find] include = ["mlpyqtgraph", "mlpyqtgraph.*"] diff --git a/tests/__init__.py b/tests/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/basic_test.py b/tests/basic_test.py new file mode 100644 index 0000000..abbdc22 --- /dev/null +++ b/tests/basic_test.py @@ -0,0 +1,15 @@ +""" Basic tests for mlpyqtgraph """ + +import mlpyqtgraph as mpg + + +def test_open_close(): + """ Test opening and closing a figure """ + + @mpg.plotter() + def main(): + fig = mpg.figure(title='Test') + mpg.plot([1, 2, 3], [2, 3, 4]) + fig.close() + + main()