Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_hybrid_module_exposure failing #122

Closed
DominicDirkx opened this issue Oct 31, 2023 · 2 comments
Closed

test_hybrid_module_exposure failing #122

DominicDirkx opened this issue Oct 31, 2023 · 2 comments
Assignees

Comments

@DominicDirkx
Copy link
Member

DominicDirkx commented Oct 31, 2023

Hi @alopezrivera , after merging the MPC and Horizons code, it looks like the new unit test for the hybrid modules is failing. I'm pretty sure it's not something critical, but is a result of a new directory being added, and this test comparing things incorrectly. In the process of moving this code into the correct place, could you also check whether this works again? Thanks!

https://dev.azure.com/tudat-team/feedstock-builds/_build/results?buildId=1319&view=logs&j=2928da41-3b64-5ab6-d69b-0a36120eed79

(relevant part copy-pasted below)



2023-10-31T07:44:35.2212041Z tests/test_hybrid_module_exposure.py::test_tudatpy_kernel_module_exposure FAILED [100%]
2023-10-31T07:44:35.2213025Z 
2023-10-31T07:44:35.2213832Z =================================== FAILURES ===================================
2023-10-31T07:44:35.2214471Z _____________________ test_tudatpy_kernel_module_exposure ______________________
2023-10-31T07:44:35.2214854Z 
2023-10-31T07:44:35.2215147Z     def test_tudatpy_kernel_module_exposure():
2023-10-31T07:44:35.2215474Z     
2023-10-31T07:44:35.2215646Z         import tudatpy.kernel as kernel
2023-10-31T07:44:35.2216188Z     
2023-10-31T07:44:35.2216353Z         exposed_kernel_modules = [
2023-10-31T07:44:35.2217008Z             # 'utils',
2023-10-31T07:44:35.2217257Z             'astro',
2023-10-31T07:44:35.2217520Z             'trajectory_design',
2023-10-31T07:44:35.2217829Z             'constants',
2023-10-31T07:44:35.2218091Z             'interface',
2023-10-31T07:44:35.2218330Z             # 'io',
2023-10-31T07:44:35.2218544Z             'math',
2023-10-31T07:44:35.2218799Z             'numerical_simulation'
2023-10-31T07:44:35.2219066Z         ]
2023-10-31T07:44:35.2219220Z     
2023-10-31T07:44:35.2219571Z         module_methods = lambda module: inspect.getmembers(module, inspect.isroutine)
2023-10-31T07:44:35.2220084Z     
2023-10-31T07:44:35.2220262Z         module_variables = lambda module: [
2023-10-31T07:44:35.2220669Z             (name, value) for name, value in inspect.getmembers(module)
2023-10-31T07:44:35.2221508Z             if (not inspect.isroutine(value) and not inspect.ismodule(value) and not name.startswith('__'))
2023-10-31T07:44:35.2222140Z         ]
2023-10-31T07:44:35.2222296Z     
2023-10-31T07:44:35.2222621Z         for (submodule_name, submodule) in _recursively_find_children(kernel):
2023-10-31T07:44:35.2223085Z     
2023-10-31T07:44:35.2223465Z             if submodule.__name__.split('.')[2] in exposed_kernel_modules:
2023-10-31T07:44:35.2223995Z                 kernel_module  = import_module(submodule.__name__)
2023-10-31T07:44:35.2224667Z                 exposed_module = import_module(submodule.__name__.replace('kernel.', ''))
2023-10-31T07:44:35.2225141Z     
2023-10-31T07:44:35.2225357Z                 # Assert both modules contain the same methods
2023-10-31T07:44:35.2226037Z >               assert all([method in module_methods(kernel_module) for method in module_methods(exposed_module)])
2023-10-31T07:44:35.2226684Z E               assert False
2023-10-31T07:44:35.2227061Z E                +  where False = all([True, False, True, True, True, True, ...])
2023-10-31T07:44:35.2227412Z 
2023-10-31T07:44:35.2227678Z tests/test_hybrid_module_exposure.py:51: AssertionError
2023-10-31T07:44:35.2228183Z =========================== short test summary info ============================
2023-10-31T07:44:35.2229034Z FAILED tests/test_hybrid_module_exposure.py::test_tudatpy_kernel_module_exposure - assert False
2023-10-31T07:44:35.2229781Z  +  where False = all([True, False, True, True, True, True, ...])
2023-10-31T07:44:35.2230318Z ============================== 1 failed in 4.46s ===============================
2023-10-31T07:44:35.8377782Z Tests failed for tudatpy-0.7.3.dev29-py39hd7dfd30_0.conda - moving package to /home/conda/feedstock_root/build_artifacts/broken
@alopezrivera
Copy link
Contributor

Addressed in #123

@alopezrivera
Copy link
Contributor

#123 has been merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants