Skip to content
Snippets Groups Projects
Commit a5817327 authored by Clément Jonglez's avatar Clément Jonglez
Browse files

add 2 test cases for loading orekit data 1) from library, 2) from downloaded zip

parent f44d2e0e
No related branches found
No related tags found
1 merge request!5Support loading orekit data from Python library
import os
import orekit
from orekit.pyhelpers import setup_orekit_curdir, download_orekit_data_curdir
from org.orekit.utils import Constants
def test_load_data_from_library():
orekit.initVM()
setup_orekit_curdir(from_pip_library=True)
assert(Constants.WGS84_EARTH_EQUATORIAL_RADIUS == 6378137.0)
def test_download_and_load_data():
orekit.initVM()
orekit_data_zip = 'orekit-data.zip'
if os.path.isfile(orekit_data_zip):
os.remove(orekit_data_zip)
download_orekit_data_curdir(filename=orekit_data_zip)
setup_orekit_curdir(filename=orekit_data_zip)
assert(Constants.WGS84_EARTH_EQUATORIAL_RADIUS == 6378137.0)
if os.path.isfile(orekit_data_zip):
os.remove(orekit_data_zip)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment