def test_transform_path_pri(): """ This checks that the transformation path prioritization works by making sure the ICRS -> Gal transformation always goes through FK5 and not FK4. """ frame_transform_graph.invalidate_cache() tpath, td = frame_transform_graph.find_shortest_path(ICRS, Galactic) assert tpath == [ICRS, FK5, Galactic] assert td == 2 # but direct from FK4 to Galactic should still be possible tpath, td = frame_transform_graph.find_shortest_path(FK4, Galactic) assert tpath == [FK4, FK4NoETerms, Galactic] assert td == 2
def test_transform_path_pri(): """ This checks that the transformation path prioritization works by making sure the ICRS -> Gal transformation always goes through FK5 and not FK4. """ frame_transform_graph.invalidate_cache() tpath, td = frame_transform_graph.find_shortest_path(ICRS, Galactic) assert tpath == [ICRS, FK5, Galactic] assert td == 2 # but direct from FK4 to Galactic should still be possible tpath, td = frame_transform_graph.find_shortest_path(FK4, Galactic) assert tpath == [FK4, FK4NoETerms, Galactic] assert td == 2