diff --git a/.github/workflows/ci_tests.yml b/.github/workflows/ci_tests.yml index 3efb5ad..06f5937 100644 --- a/.github/workflows/ci_tests.yml +++ b/.github/workflows/ci_tests.yml @@ -66,13 +66,11 @@ jobs: python: 3.9 toxenv: py39-test-alldeps toxargs: -v --develop - toxposargs: --open-files - name: Python 3.8 with oldest supported version of all dependencies os: ubuntu-18.04 python: 3.8 toxenv: py38-test-oldestdeps-alldeps-cov-clocale - toxposargs: --remote-data=github - name: Python 3.9 with all optional dependencies (Windows) os: windows-latest diff --git a/docs/index.rst b/docs/index.rst index e887c7f..ea2e68c 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -6,6 +6,10 @@ Overload NumPy Quick Worked Example -------------------- +.. testsetup:: + + >>> from __future__ import annotations + First, some imports: >>> from dataclasses import dataclass @@ -23,7 +27,7 @@ The overloads apply to an array wrapping class. Let's define one: ... class Vector1D(NDFunctionMixin): ... '''A simple array wrapper.''' ... x: np.ndarray - ... NP_FUNC_OVERLOADS: 'ClassVar[NumPyOverloader]' = VEC_FUNCS + ... NP_FUNC_OVERLOADS: ClassVar[NumPyOverloader] = VEC_FUNCS Now ``numpy`` functions can be overloaded and registered for ``Vector1D``. diff --git a/pyproject.toml b/pyproject.toml index 8bdfdf3..9d3166d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -175,7 +175,7 @@ [tool.pytest.ini_options] - testpaths = ["src/overload_numpy", "docs"] + testpaths = ["tests", "src/overload_numpy", "docs"] astropy_header = "True" doctest_plus = "enabled" text_file_format = "rst"