From 3c970f503070654a8c483c03ddc7aad619b69f6b Mon Sep 17 00:00:00 2001
From: Yannick DAYER <yannick.dayer@idiap.ch>
Date: Wed, 9 Nov 2022 12:25:46 +0100
Subject: [PATCH] Renaming test_utils to prevent parsing with pytest

---
 src/bob/io/base/{test_utils.py => testing_utils.py} | 8 ++++----
 tests/test_image_support.py                         | 2 +-
 tests/test_io.py                                    | 2 +-
 tests/test_utlilities.py                            | 8 ++++----
 4 files changed, 10 insertions(+), 10 deletions(-)
 rename src/bob/io/base/{test_utils.py => testing_utils.py} (95%)

diff --git a/src/bob/io/base/test_utils.py b/src/bob/io/base/testing_utils.py
similarity index 95%
rename from src/bob/io/base/test_utils.py
rename to src/bob/io/base/testing_utils.py
index 1539ec6..240a9ad 100644
--- a/src/bob/io/base/test_utils.py
+++ b/src/bob/io/base/testing_utils.py
@@ -58,8 +58,8 @@ def temporary_filename(prefix="bobtest_", suffix=".hdf5"):
 
     .. code-block:: py
 
-       import bob.io.base.test_utils
-       temp = bob.io.base.test_utils.temporary_filename()
+       import bob.io.base.testing_utils
+       temp = bob.io.base.testing_utils.temporary_filename()
        try:
          # use the temp file
          ...
@@ -96,9 +96,9 @@ def extension_available(extension):
 
     .. code-block:: py
 
-       import bob.io.base.test_utils
+       import bob.io.base.testing_utils
 
-       @bob.io.base.test_utils.extension_available('.ext')
+       @bob.io.base.testing_utils.extension_available('.ext')
        def my_test():
          ...
     """
diff --git a/tests/test_image_support.py b/tests/test_image_support.py
index 75a8a8a..ad7ef82 100644
--- a/tests/test_image_support.py
+++ b/tests/test_image_support.py
@@ -14,7 +14,7 @@ import numpy
 import pytest
 
 from bob.io.base import load, write
-from bob.io.base.test_utils import datafile, temporary_filename
+from bob.io.base.testing_utils import datafile, temporary_filename
 
 # These are some global parameters for the test.
 PNG_INDEXED_COLOR = datafile("img_indexed_color.png", __name__)
diff --git a/tests/test_io.py b/tests/test_io.py
index 9f579d5..5977ea2 100644
--- a/tests/test_io.py
+++ b/tests/test_io.py
@@ -4,7 +4,7 @@ import numpy as np
 import pytest
 
 from bob.io.base import load, save, vstack_features
-from bob.io.base.test_utils import temporary_filename
+from bob.io.base.testing_utils import temporary_filename
 
 
 def test_io_vstack():
diff --git a/tests/test_utlilities.py b/tests/test_utlilities.py
index d5f3da1..b9c1477 100644
--- a/tests/test_utlilities.py
+++ b/tests/test_utlilities.py
@@ -4,7 +4,7 @@ import click
 
 from click.testing import CliRunner
 
-from bob.io.base import test_utils
+from bob.io.base import testing_utils
 
 
 @click.command("dummy")
@@ -25,14 +25,14 @@ def dummy_command_raise():
 def test_assert_dummy():
     result = CliRunner().invoke(dummy_command_0)
     assert result.exit_code == 0
-    test_utils.assert_click_runner_result(result)
+    testing_utils.assert_click_runner_result(result)
 
     result = CliRunner().invoke(dummy_command_1)
     assert result.exit_code == 1
-    test_utils.assert_click_runner_result(result, exit_code=1)
+    testing_utils.assert_click_runner_result(result, exit_code=1)
 
     result = CliRunner().invoke(dummy_command_raise)
     assert result.exit_code == 1
-    test_utils.assert_click_runner_result(
+    testing_utils.assert_click_runner_result(
         result, exit_code=1, exception_type=RuntimeError
     )
-- 
GitLab