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

expand test_xerbla_override to allow debugging #130

Merged
merged 3 commits into from
May 21, 2020

Conversation

bnavigator
Copy link
Collaborator

Be more verbose if the test fails. It could fail because of xerbla not being overridden or because the import of the wrapper library failed.

@repagh repagh marked this pull request as ready for review May 20, 2020 19:56
@repagh
Copy link
Member

repagh commented May 20, 2020

Yes, it now works fine. I only get errors when running from within the Slycot folder; maybe that was the problem all along.

Slycot repa$ pytest --pyargs slycot

From the result:

input = None, capture_output = False, timeout = None, check = True
popenargs = (['/Users/repa/anaconda3/envs/test-slycot/bin/python', '-c', '\nfrom slycot._wrapper import ab08nd\n# equil=\'X\' is invalid\nout = ab08nd(1, 1, 1, [1], [1], [1], [1], equil=\'X\')\nprint("INFO={}".format(out[-1]))\n'],)
kwargs = {'stderr': -2, 'stdout': -1, 'universal_newlines': True}, process = <subprocess.Popen object at 0x1177f0ad0>
stdout = 'Traceback (most recent call last):\n  File "<string>", line 2, in <module>\n  File "/Users/repa/control/src/Slycot/sl...er\nImportError: cannot import name \'_wrapper\' from \'slycot\' (/Users/repa/control/src/Slycot/slycot/__init__.py)\n'
stderr = None, retcode = 1

The other tests all work, so this seems to be due to the fact that the subprocess code is executed in the current folder, where it finds a slycot sub-folder, complete with init.py but without wrapper.

@bnavigator
Copy link
Collaborator Author

Should be able to run from source folder again

@repagh repagh merged commit 0105fa1 into python-control:master May 21, 2020
@repagh
Copy link
Member

repagh commented May 21, 2020

Perfect, good solution

@bnavigator bnavigator deleted the xerbla-debug branch December 31, 2020 13:32
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