DassHydro / smash

An open source, Python library interfacing the Fortran Spatially distributed Modelling and ASsimilation for Hydrology platform.
https://smash.recover.inrae.fr/
GNU General Public License v3.0
12 stars 6 forks source link

BUG: Generate baseline #202

Closed inoelloc closed 3 months ago

inoelloc commented 4 months ago

With the new build system, importing test files to retrieve the functions used to generate the baseline no longer works.

module = importlib.import_module(mn)

We must add now:

sys.path.insert(0, "")

to allow local import but there is a directory called io which collide with the io standard library ... One way is to import from tests directory instead of importing:

import io

use

import tests.io

It can be done by changing the current directory:

os.chdir("..")