Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance unit tests requirements handling #897

Merged
merged 7 commits into from
Feb 3, 2025
Merged

Conversation

gertjanvanzwieten
Copy link
Contributor

No description provided.

This patch renames the optional dependences to export-mpl, matrix-mkl,
matrix-scipy and import-gmsh, i.e. with the former underscore replaced by a
dash. This makes explicit that is already performed by the flit build systems,
rendering the old names invalid.
@gertjanvanzwieten gertjanvanzwieten force-pushed the requires branch 8 times, most recently from 327425d to a1af06e Compare January 31, 2025 14:39
This patch modifies the _util.loadlib function to search and load a dynamic
link library by its base name, i.e. without any prefix like lib, suffix like
.so, .dylib, or version number. Compared to ctypes.util.find_library it adds
the functionality of searching the site-package directory in case the library
is not found in the default locations.

The _mkl module is modified to use the new loadlib. The configure_mkl devtool
is removed for being no longer required, along with the NUTILS_MATRIX_MKL_LIB
environment variable.
This patch introduces the require_module method to testing.TestCase, and uses
the new capability to simplify the setUp method of DocTestCase.
This patch adds the TestCase.require_application method and
testing.requires_application decorator, which signals to unit tests that a test
can be skipped if an application is not installed on the system. The new
decorator is used to simplify conditional skipping of
test_graph.generate.test_export_graphviz.
 This patch adds the TestCase.require_library method and
 testing.requires_library decorator, which signals to unit tests that a test
 can be skipped if a library is not present on the system. The new decorator is
 used to change conditional skipping of the various matrix backend tests.
This patch adds the NUTILS_REQUIRES environment variable, which instruct the
require methods and requires decorators in testing that any missing item is not
acceptable and should not result in a skipped test. The variables are set in
appropriate places of the test workflow.
@gertjanvanzwieten gertjanvanzwieten merged commit 249e693 into master Feb 3, 2025
22 checks passed
@joostvanzwieten joostvanzwieten deleted the requires branch February 3, 2025 10:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants