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

Features/constraint tests #73

Merged
merged 3 commits into from Jan 29, 2016

Conversation

Projects
None yet
1 participant
@uvchik
Copy link
Member

uvchik commented Jan 29, 2016

I added a draft how to test constraints built by a specific class. I do not know if it is a smart way, so I would like to get some feedback.

I create an isolated object, build the constraints, write out an lp-file and compare it with an existing lp-file.

As an example a add tests for a simple transformer and a fixed source.

@uvchik

This comment has been minimized.

Copy link
Member Author

uvchik commented on tests/basic_tests.py in c1d1006 Jan 29, 2016

@gnn : I had to disable this test because it did not work any more and I do not know how to fix it.

This is a code comment and is connected to the code I am talking about.

@uvchik

This comment has been minimized.

Copy link
Member Author

uvchik commented Jan 29, 2016

There is also a possibility to compare the output of the blocks using the method pprint or display.

block.pprint()

Therefore I created separate methods. These methods could return the block and then it is possible to check the block within the tests. I do not know if this is necessary if we have the lp-file-tests.

@uvchik

This comment has been minimized.

Copy link
Member Author

uvchik commented Jan 29, 2016

The test command is nosetests3 --with-doctest --rednose --doctest-options '+ELLIPSIS'.

The parameter --rednose is optional.

@uvchik uvchik self-assigned this Jan 29, 2016

uvchik added a commit that referenced this pull request Jan 29, 2016

@uvchik uvchik merged commit b77c06f into dev Jan 29, 2016

@uvchik

This comment has been minimized.

Copy link
Member Author

uvchik commented Jan 29, 2016

I talked to @gnn and @simonhilpert so I merged the test to have them in January release.

@uvchik uvchik deleted the features/constraint_tests branch Jan 29, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment