Jammy2211 / PyAutoLens

PyAutoLens: Open Source Strong Gravitational Lensing
https://pyautolens.readthedocs.io/
MIT License
163 stars 32 forks source link

Unit test failing due to from_dict #190

Open Jammy2211 opened 2 years ago

Jammy2211 commented 2 years ago
tracer = <autolens.lens.ray_tracing.Tracer object at 0x7f6fb2cf6b80>
tracer_dict = {'cosmology': <class 'autogalaxy.cosmology.wrap.Planck15'>, 'planes': [<autogalaxy.plane.plane.Plane object at 0x7f6fb561cc70>, <autogalaxy.plane.plane.Plane object at 0x7f6fb561cbe0>], 'profiling_dict': None}

    def test_from_dict(tracer, tracer_dict):
>       assert tracer.from_dict(tracer_dict) == tracer
E       AssertionError: assert <autolens.lens.ray_tracing.Tracer object at 0x7f6fb561cd00> == <autolens.lens.ray_tracing.Tracer object at 0x7f6fb2cf6b80>
E        +  where <autolens.lens.ray_tracing.Tracer object at 0x7f6fb561cd00> = <function Tracer.from_dict at 0x7f6fb8f91700>({'cosmology': <class 'autogalaxy.cosmology.wrap.Planck15'>, 'planes': [<autogalaxy.plane.plane.Plane object at 0x7f6fb561cc70>, <autogalaxy.plane.plane.Plane object at 0x7f6fb561cbe0>], 'profiling_dict': None})
E        +    where <function Tracer.from_dict at 0x7f6fb8f91700> = <autolens.lens.ray_tracing.Tracer object at 0x7f6fb2cf6b80>.from_dict

test_autolens/lens/test_dict.py:85: AssertionError
Jammy2211 commented 2 years ago

The PR didnt seem to fix this or lead to another issue:

https://github.com/Jammy2211/PyAutoLens/actions/runs/2685051806