Fix segfault after test failure, when Device used as a pytest fixture
requested to merge 652-segfault-when-an-exception-is-thrown-after-monkey-patching-a-device-class-in-a-pytest-fixture into develop
Closes #652 (closed)
It is a tricky case, so I, actually, cannot create a clear compact test for it, so I tried to simplify Tomase`s code as possible. Then I did implement Anton's suggestion (the first one, with checking Util) and it works.
This does not make use of Device as pytest fixture 100% safe, but should be better.
Edited by Yury Matveyev