Skip to content

Make get_variable return None if the var doesn't exist in the workspace.#92

Merged
arokem merged 1 commit intoarokem:masterfrom
dukebody:master
Oct 27, 2014
Merged

Make get_variable return None if the var doesn't exist in the workspace.#92
arokem merged 1 commit intoarokem:masterfrom
dukebody:master

Conversation

@dukebody
Copy link

This fixes bug #91 .

@isbadawi
Copy link
Collaborator

Looks fine to me!

@arokem
Copy link
Owner

arokem commented Oct 27, 2014

Thanks for doing this - and thanks @isbadawi for taking a look and helping.

Would you mind adding a test (for example, here: https://github.com/arokem/python-matlab-bridge/blob/master/pymatbridge/tests/test_run_code.py) that fails without this fix, and passes once the fix is applied?

@dukebody
Copy link
Author

Hi @arokem ! There is a test here: https://github.com/dukebody/python-matlab-bridge/blob/b47e5da875fb782df14088262bacb71514c9fe8f/pymatbridge/tests/test_get_variable.py#L38

Is this enough or should we include something in test_run_code.py as well?

@arokem
Copy link
Owner

arokem commented Oct 27, 2014

Sorry - I must have missed that. Excellent!

arokem added a commit that referenced this pull request Oct 27, 2014
Make get_variable return None if the var doesn't exist in the workspace.
@arokem arokem merged commit 6f3bdf2 into arokem:master Oct 27, 2014
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