From a680b5e750a3f89390112fdf657ff12e19f638a7 Mon Sep 17 00:00:00 2001 From: Kirill Kouzoubov Date: Wed, 26 Oct 2022 09:28:37 +1100 Subject: [PATCH] Test all code paths in crs equality operator --- tests/test_crs.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/test_crs.py b/tests/test_crs.py index ee8ed310..2f7320a8 100644 --- a/tests/test_crs.py +++ b/tests/test_crs.py @@ -12,6 +12,7 @@ from odc.geo import geom from odc.geo.crs import ( + _CRS, CRS, CRSError, CRSMismatchError, @@ -167,6 +168,9 @@ def test_crs_compat(): assert CRS(crs_rio).epsg == 3577 assert (CRS(crs_rio) == crs_rio) is True + assert CRS(_CRS(crs_rio)) == CRS(crs_rio) + assert CRS(str(crs_rio)) == crs_rio + assert CRS(crs_rio) == 3577 with pytest.raises(CRSError): CRS(("random", "tuple"))