Skip to content

Add option for relative tolerance in pytest#19

Open
davide-f wants to merge 9 commits intomainfrom
tolerance_pytest
Open

Add option for relative tolerance in pytest#19
davide-f wants to merge 9 commits intomainfrom
tolerance_pytest

Conversation

@davide-f
Copy link
Member

No description provided.

@davide-f
Copy link
Member Author

@AlessandroPampado99 BundleSolver had 1e-4 as default tolerance that is larger than the default 1e-5. Here we propose differentiated tolerances for IB and non-IB and their customization through pytest calls e.g. "pytest --rel=0.0001"

This is ready to merge when CI passes. Subsequently #20

@AlessandroPampado99
Copy link
Collaborator

@davide-f tests are not passing for the same reason about tolerance

FAILED test/test_investmentblock.py::test_investment[7: 3n_3c_1gext_1h_1bext_2l.xlsx] - assert 746029920.6 == 736979038.3716856 ± 7.4e+04

comparison failed
Obtained: 746029920.6
Expected: 736979038.3716856 ± 7.4e+04
============ 1 failed, 23 passed, 4 skipped, 24 warnings in 41.48s =============
Error: Process completed with exit code 1.

I'm gonna take a look at it

@davide-f
Copy link
Member Author

@AlessandroPampado99 please share a complete instance that is failing for this case

With the instance, we check if the value is truly random.

We have randomness in the generation of instances right?

In the future we shall improve tests to facilitate to recognize errors in the conversions and errors in smspp.
For example, some tests shall ensure that the smsnetwork has the expected structure and content, regardless of whether it is functional with sms++

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