From 248e1380da6e4f9fe7ac3feeb85d67cbd50bbdba Mon Sep 17 00:00:00 2001 From: "ahassan@azavea.com" Date: Mon, 4 Oct 2021 20:40:02 +0500 Subject: [PATCH] fix: bug in unit test This was discovered after the appropriate __init__.py file was added and this test actually ran with the rest of the unit tests for the first time. --- tests/pytorch_learner/dataset/test_transform.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/pytorch_learner/dataset/test_transform.py b/tests/pytorch_learner/dataset/test_transform.py index ff9afd5e8..c140637fe 100644 --- a/tests/pytorch_learner/dataset/test_transform.py +++ b/tests/pytorch_learner/dataset/test_transform.py @@ -36,7 +36,7 @@ def test_box_format_conversions_xywh(self): [.2, .3, .6, 1.], ], dtype=float) boxes_albu = xywh_to_albu(boxes, (10, 10)) - self.assertTrue(np.all(boxes_albu == boxes_albu_gt)) + np.testing.assert_allclose(boxes_albu, boxes_albu_gt) if __name__ == '__main__':