• Kirill Smelkov's avatar
    *: Use defer for dbclose & friends · 5c8340d2
    Kirill Smelkov authored
    For tests this makes sure that if one test fails, it won't make following
    tests fail just because the next test will fail trying to lock test database.
    For regular code (demo_zbigarray.py) this is also a good thing to do -
    to always close the database irregardless of whether an exception was
    raised before program reached end of main.
    Pygolang becomes regular - not test only - dependency. Being regular
    dependency is currently required only by demo_zbigarray.py, but it will
    be also used in upcoming wcfs, so adding pygolang into wendelin.core
    dependencies aligns with the plan.
    dbclose now uses defer almost everywhere - there are still few places in
    tests, where one test function is opening/closing test database multiple
    times - those were not (yet ?) converted.