From eacfa30195c325b47160cb4982d48c234081d7c3 Mon Sep 17 00:00:00 2001
From: Andre Anjos <andre.dos.anjos@gmail.com>
Date: Wed, 2 Aug 2023 12:19:15 +0200
Subject: [PATCH] [tests] Comment out outdated test sections

---
 tests/test_image_utils.py | 45 ++++++++++++++++++---------------------
 1 file changed, 21 insertions(+), 24 deletions(-)

diff --git a/tests/test_image_utils.py b/tests/test_image_utils.py
index 18c7fa24..e02273f9 100644
--- a/tests/test_image_utils.py
+++ b/tests/test_image_utils.py
@@ -6,10 +6,7 @@
 import numpy
 import PIL.Image
 
-from ptbench.data.image_utils import (  # SingleAutoLevel16to8,
-    RemoveBlackBorders,
-    load_pil,
-)
+from ptbench.data.image_utils import RemoveBlackBorders
 
 
 def test_remove_black_borders(datadir):
@@ -32,23 +29,23 @@ def test_remove_black_borders(datadir):
     numpy.testing.assert_array_equal(raw_without_black_border, raw_rbb_removed)
 
 
-def test_load_pil_16bit(datadir):
-    # If the ratio is higher 0.5, image is probably clipped
-    Level16to8 = SingleAutoLevel16to8()
-
-    data_file = str(datadir / "16bits.png")
-    image = numpy.array(Level16to8(load_pil(data_file)))
-
-    count_pixels = numpy.count_nonzero(image)
-    count_max_value = numpy.count_nonzero(image == image.max())
-
-    assert count_max_value / count_pixels < 0.5
-
-    # It should not do anything to an image already in 8 bits
-    data_file = str(datadir / "raw_without_black_border.png")
-    img_loaded = load_pil(data_file)
-
-    original_8bits = numpy.array(img_loaded)
-    leveled_8bits = numpy.array(Level16to8(img_loaded))
-
-    numpy.testing.assert_array_equal(original_8bits, leveled_8bits)
+# def test_load_pil_16bit(datadir):
+#     # If the ratio is higher 0.5, image is probably clipped
+#     Level16to8 = SingleAutoLevel16to8()
+#
+#     data_file = str(datadir / "16bits.png")
+#     image = numpy.array(Level16to8(load_pil(data_file)))
+#
+#     count_pixels = numpy.count_nonzero(image)
+#     count_max_value = numpy.count_nonzero(image == image.max())
+#
+#     assert count_max_value / count_pixels < 0.5
+#
+#     # It should not do anything to an image already in 8 bits
+#     data_file = str(datadir / "raw_without_black_border.png")
+#     img_loaded = load_pil(data_file)
+#
+#     original_8bits = numpy.array(img_loaded)
+#     leveled_8bits = numpy.array(Level16to8(img_loaded))
+#
+#     numpy.testing.assert_array_equal(original_8bits, leveled_8bits)
-- 
GitLab