Fix segfault after test failure, when Device used as a pytest fixture
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 Matveev