haxsaw/hikaru

test74 failing on master

Closed this issue · 5 comments

aantn commented

When running basic_tests.py I get the following error. All other tests pass successfully:

test74 failed with should have gotten a ValueError, <class 'AssertionError'>

Process finished with exit code 0

I'll have a look.

Hmm...can't reproduce so far. What version of Python are you using?

aantn commented

Python 3.9 on Windows.

PS C:\Projects\hikaru\tests> C:\Python39\python.exe .\basic_tests.py
self=dos and other is overlord
self=ns1 and other is ns2
self=first and other is second
test74 failed with should have gotten a ValueError, <class 'AssertionError'>
self=hello-kiamol-3 and other is adsgad
PS C:\Projects\hikaru\tests>

Interesting...it appears that some other test before test74 generates side effects that change the internal catalogue of the Pod object being tested. If run under pytest, all tests pass, but in Python itself only that one fails. If you only run test74 in Python and no others then it also passes. If you make a new Pod object then test74 passes. It seems there's a bug in the catalogue re-population code; if you eliminate that test then test74 passes. Apparently pytest orders the tests differently hence this was never a problem. I'll see that it gets fixed with tests next release.

Fixed in upcoming 0.4 release