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

Add tests to package #8

Open
pchtsp opened this issue Aug 31, 2021 · 5 comments
Open

Add tests to package #8

pchtsp opened this issue Aug 31, 2021 · 5 comments

Comments

@pchtsp
Copy link

pchtsp commented Aug 31, 2021

Hello again!

It'd be awesome to have some unittests integrated in this package. If you need examples of projects, you can go check the PuLP unittests for some example problems: https://github.com/coin-or/pulp/blob/master/pulp/tests/test_pulp.py

@jmaerte
Copy link
Owner

jmaerte commented Oct 25, 2021

Hi again!

Actually you could help me out here; writing the unit tests is actually not really a problem but rather to have some test cases (i.e. some MPS files) that are licensed such that I can simply put the into my project as cases...

Best regards!

@pchtsp
Copy link
Author

pchtsp commented Oct 25, 2021

many_mps.zip

I'm sharing with you the mps files that are produced by the examples in PuLP unit tests.
If you want, I could give you for each file the PuLP json file (which is similar but not exactly the one in pysmps).
Also: it may be that some of the mps files are repeated... I haven't really checked for duplicates.

@jmaerte
Copy link
Owner

jmaerte commented Oct 25, 2021

Great. However; I will try to do independent unit testing so we do not test for duplicates. If you integrate pysmps into your unit tests sometime you will implicitly do the tests anyway. I will write some hard-coded generic mps files at first and when the MPS file writer is done I will program some unit tests involving if the written and read back-in dictionary are coherent...

But thanks anyway!

@jmaerte
Copy link
Owner

jmaerte commented Oct 25, 2021

There is a first unit test example in the numpy_free branch.

@jmaerte
Copy link
Owner

jmaerte commented Oct 25, 2021

I added a second unit test for checking if the multiple RHS functionality works. Check the first issue to see what I mean by this. The same could be implemented for boundaries too.. The RHS functionality unit test runs successfully.

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

No branches or pull requests

2 participants