-
Notifications
You must be signed in to change notification settings - Fork 32
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
Assert connection decorator, see #289 #290
Conversation
Since these are just unit tests, you probably don't want to do all the work needed to mock-up Instead, you could simply test the decorator itself (simple example below) and if it's also needed to test this for
|
I put the class def inside the test function as I saw there were other mocks in the file, not sure it is the right thing to do |
Currently failing at |
sorry, forgot to run the test before the push :/ |
Conflicting PR. Removed from build OMERO-python-superbuild-push#712. See the console output for more details.
|
I've closed #276 which seems to be the PR responsible for the conflict above. Hopefully should be in the merge build now... |
@will-moore : did you give this a try? |
Yes: With this PR:
Seems to be working, although Without this PR:
|
Uh? Maybe using a format string would solve the problem? Trying that now |
I'm afraid that doesn't make a lot of difference for me, but don't know why not!
|
I tested generating the same kind of error message in a generic decorator and did not have the problem (with a ValueError). Maybe something strange going on with IceConnectionLostException? I'm trying without fomatting now |
@will-moore suggested solving #289 with an assertConnected decorator
IDK how to set up a mock connection to test. I tested with my instance, but the current test wont pass