Problem with python tests and DataContext

When trying to run the python tests (as described in the manual installation):

python -m test

with the SRC_DIR is configured to the directory containing
The following error appears for any tests with setup_orekit_curdir():

_________________________ ERROR collecting __________________________ in <module>
../../RuggedVenv/lib/python3.6/site-packages/orekit-10.3-py3.6-linux-x86_64.egg/orekit/ in setup_orekit_curdir
    DM = DataContext.getDefault().getDataProvidersManager()
E   NameError: name 'DataContext' is not defined

I tried to put in the same directory as the tests but it does not solve the problem.

The file is in the same directory as the tests.

Any idea ?

Sorry that manual instruction is quite old and likely outdatedā€¦ I think there may be an error in the file that has not been updated in that repository, please use the one from GitHub - petrushy/orekit_python_artifacts at version-10.3.1

The tests there are the latest as well.

Let us know how it goes

Now the and test files should be the latest ones on the gitlab repo also.

Thanks Petrus for the new and the new tests, everything runs fine:
38 passed, 2115 warnings

I suppose the warnings are normal, for instance:

  /usr/lib/python3.6/importlib/ DeprecationWarning: builtin type LagrangianPoints has no __module__ attribute
    return f(*args, **kwds)

I copied the test/ directory from, without copying the resources/ directory at first. So some tests failed because of the missing resources/ directory. Once copied the resources/ directory everything runs fine.

I noticed that in, there is no resources/ directory but a file. When trying to launch: python -m pytest, some tests failed due to the missing directory, for instance:

org.orekit.errors.OrekitException: unable to find file ./resources/ccsds/AEMExample.txt