Skip to content

Allow unit tests to run without slycot #122

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

Merged
merged 4 commits into from
Dec 31, 2016

Conversation

murrayrm
Copy link
Member

This PR provides updates to allow unit tests to run correctly when slycot is not installed. There is also a change in xferfcn.py to allow proper creation of transfer functions when num or den is a 0d ndarray. This can occur when slycot is not installed due to a difference in the way that transfer functions are created from state space matrices in xferfcn._convertToTransferFunction() when slycot is not available.

@coveralls
Copy link

coveralls commented Dec 26, 2016

Coverage Status

Changes Unknown when pulling cab850a on murrayrm:noslycot into ** on python-control:master**.

@murrayrm murrayrm changed the title Noslycot Allow unit tests to run without slycot Dec 26, 2016
@coveralls
Copy link

coveralls commented Dec 26, 2016

Coverage Status

Changes Unknown when pulling c90a399 on murrayrm:noslycot into ** on python-control:master**.

@slivingston slivingston self-assigned this Dec 31, 2016

# Set up a transfer function (should always work)
tfcn = control.tf([[[-235, 1.146e4],
[-235, 1.146E4],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indentation here and on the next 4 lines seems to be slightly off. I recommend

        tfcn = control.tf([[[-235, 1.146e4],
                            [-235, 1.146E4],
                            [-235, 1.146E4, 0]]],
                          [[[1, 48.78, 0],
                            [1, 48.78, 0, 0],
                            [0.008, 1.39, 48.78]]])

@coveralls
Copy link

coveralls commented Dec 31, 2016

Coverage Status

Changes Unknown when pulling 7de3cc8 on murrayrm:noslycot into ** on python-control:master**.

@slivingston
Copy link
Member

For future work, I think that it would be useful to either:

  • notify the user when a test case is modified according to whether slycot is found; or
  • separate instances of the above into uniquely named tests, so that a test case is never hot-swapped but rather skipped or not.

@slivingston slivingston merged commit 25747c7 into python-control:master Dec 31, 2016
@murrayrm murrayrm deleted the noslycot branch January 5, 2017 06:53
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.

3 participants