10BC0 Added call_or_unsupported to vm.rs by BojanKogoj · Pull Request #197 · RustPython/RustPython · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@BojanKogoj
Copy link
Contributor

This is to prevent code duplication. Based on #188

@BojanKogoj
Copy link
Contributor Author

How to write tests to make sure this is working correctly? I would need to catch exception

@windelbouwman
Copy link
Contributor

You could write rust unit tests, but in this case it might be better to write a python test snippet which catches the exception and tests if the proper exception is raised. You could use try-except-else for this, like is done here: https://github.com/RustPython/RustPython/blob/master/tests/snippets/builtin_hex.py

@windelbouwman windelbouwman merged commit a17fb3f into RustPython:master Nov 17, 2018
@BojanKogoj BojanKogoj changed the title WIP: Added call_or_unsupported to vm.rs Added call_or_unsupported to vm.rs Nov 17, 2018
@cthulahoops
Copy link
Collaborator

Sorry about being slow to respond to this.

I'd prefer to see this named something like apply_operator. I'd probably give d and r names like lhs_method_name and rhs_method_name.

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

0