cubicweb #481727 EnvBasedTC sensitive to current dir [resolved]

I have database initialization errors when I change directory in a unit tests file.

I can reproduce the error by the following code:

import os
from logilab.common.testlib import unittest_main
from cubicweb.devtools.apptest import EnvBasedTC


class AcceptanceTC(EnvBasedTC):

    def test_chdir(self):
        os.chdir('/tmp')


if __name__ == '__main__':
   unittest_main()

and run pytest against it:

rm -rf test/tmp* ; pytest test/test_chdir.py

Default unit test configuration create tmp* file in current directory instead of the cube's 'test/' directory.

prioritynormal
typebug
done in3.5.6
load0.200
load left0.000
closed by<not specified>