-
Notifications
You must be signed in to change notification settings - Fork 31
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
Reduce number of warnings emitted during testing #2887
Commits on Jan 7, 2024
-
tests/Composition: Check that running/executing with no inputs produc…
…es a warning Fixes 2 instances of: UserWarning: No inputs provided in call to ... Signed-off-by: Jan Vesely <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 3de156c - Browse repository at this point
Copy the full SHA 3de156cView commit details -
tests/learning: Enable node_spec_types test.
Simplify parametrization ids. Fixes: SyntaxWarning: "is" with a literal. Did you mean "=="? Signed-off-by: Jan Vesely <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 41b041c - Browse repository at this point
Copy the full SHA 41b041cView commit details -
tests/LCA: Add invocation wrapper to use in benchmark fixture
Return both result and num_executions_before_finished. Fixes: PytestBenchmarkWarning: Benchmark fixture was not used at all in this test! Signed-off-by: Jan Vesely <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for f83218d - Browse repository at this point
Copy the full SHA f83218dView commit details -
tests/control: Only consider first 10 values in checks
Makes the test benchmark agnostic. Remove explicit benchmark re-run from the test. Fixes: PytestBenchmarkWarning: Benchmark fixture was not used at all in this test! Signed-off-by: Jan Vesely <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for a6242aa - Browse repository at this point
Copy the full SHA a6242aaView commit details -
setup: Remove stale warning filter.
Having multiple parameter ports for parameters of the same name is now an error. There is no difference in emitted warnings with or without this filter. Signed-off-by: Jan Vesely <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 52c89dc - Browse repository at this point
Copy the full SHA 52c89dcView commit details -
tests/Composition: Remove spurious return statement
Tests should not return anything. Fixes: PytestReturnNotNoneWarning: Expected None, but tests/composition/test_composition.py::TestNestedCompositions::test_invalid_projection_deletion_when_nesting_comps returned (Composition ocomp), which will be an error in a future version of pytest. Did you mean to use `assert` instead of `return`? Signed-off-by: Jan Vesely <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for fc75cd2 - Browse repository at this point
Copy the full SHA fc75cd2View commit details -
tests: Don't use deprecated pytest.warns(None)
The construct has been deprecated in pytest warns about it: PytestRemovedIn8Warning: Passing None has been deprecated. See https://docs.pytest.org/en/latest/how-to/capture-warnings.html#additional-use-cases-of-warnings-in-tests for alternatives in common use cases. Address three different situations in tests in a way that does not hide unrelated warnings. * test_composition.py::*_subset_duplicate_warnings: capture all warnings and search them for the expected message if verbosity == True assert that there are no warnings if verbosity == False * test_projection_specifications.py::test_no_warning_when_matrix_specified: Use filterwarnings mark to change the undesired warning into an error * test_control.py::test_model_based_num_estimates Use null context or pytest.warns context based on whether warning is expected Signed-off-by: Jan Vesely <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for dbb30cb - Browse repository at this point
Copy the full SHA dbb30cbView commit details -
tests/MemoryFunctions: Escape special characters in regexp
Square brackets '[' denote a match set and need to be escaped. Fixes: FutureWarning: Possible nested set at position ... Signed-off-by: Jan Vesely <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for a532afb - Browse repository at this point
Copy the full SHA a532afbView commit details
Commits on Jan 12, 2024
-
Functions/MemoryFunctions: Do not use comparisons to empty list
Convert tested value to np.array and check its size. Fixes: DeprecationWarning: The truth value of an empty array is ambiguous. ... DeprecationWarning: elementwise comparison failed; ... Signed-off-by: Jan Vesely <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 12cffac - Browse repository at this point
Copy the full SHA 12cffacView commit details -
Distance, LinearCombination: Only compute np.log if needed
The expression replaces calculated np.log values with 0 if both v1 and v2 values at a given index are 0. Skip the computation of np.log(v2) in this case to avoid invalid values. Fixes: RuntimeWarning: divide by zero encountered in log RuntimeWarning: invalid value encountered in multiply Signed-off-by: Jan Vesely <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for fcd842c - Browse repository at this point
Copy the full SHA fcd842cView commit details -
Port/_parse_port_spec: Convert value to string to compare to keyword
Otherwise they might end up compared as containers. Fixes: FutureWarning: elementwise comparison failed; ... Signed-off-by: Jan Vesely <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 0e960c1 - Browse repository at this point
Copy the full SHA 0e960c1View commit details
Commits on Jan 20, 2024
-
Configuration menu - View commit details
-
Copy full SHA for b267b0a - Browse repository at this point
Copy the full SHA b267b0aView commit details
Commits on Jan 21, 2024
-
treewide: Assign values to ".base" attribute of a modulated Parameter
Fixes 3 instances of: FutureWarning: Setting parameter values directly using dot notation may be removed in a future release. Signed-off-by: Jan Vesely <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 2a3f89e - Browse repository at this point
Copy the full SHA 2a3f89eView commit details -
tests/RecurrentTransferMechanism: Use matrix.modulated or get_mod_mat…
…rix() instead of mod_matrix The latter is deprecated. Signed-off-by: Jan Vesely <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 15fcba7 - Browse repository at this point
Copy the full SHA 15fcba7View commit details -
setup: Error on SyntaxWarnings
Signed-off-by: Jan Vesely <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 16c70ce - Browse repository at this point
Copy the full SHA 16c70ceView commit details
Commits on Jan 23, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 6874f84 - Browse repository at this point
Copy the full SHA 6874f84View commit details
Commits on Jan 25, 2024
-
Configuration menu - View commit details
-
Copy full SHA for b453f72 - Browse repository at this point
Copy the full SHA b453f72View commit details