From 8059be716043d8648cfc9c5ccbe51332cdcb4206 Mon Sep 17 00:00:00 2001 From: Alex Willmer Date: Thu, 28 Mar 2024 11:36:32 +0000 Subject: [PATCH] ansible_mitogen: Make ansible_mitogens.utils a package Prep work for ansible_mitogen.utils.unsafe --- ansible_mitogen/{utils.py => utils/__init__.py} | 0 tests/ansible/tests/utils_test.py | 11 +++++++++++ 2 files changed, 11 insertions(+) rename ansible_mitogen/{utils.py => utils/__init__.py} (100%) create mode 100644 tests/ansible/tests/utils_test.py diff --git a/ansible_mitogen/utils.py b/ansible_mitogen/utils/__init__.py similarity index 100% rename from ansible_mitogen/utils.py rename to ansible_mitogen/utils/__init__.py diff --git a/tests/ansible/tests/utils_test.py b/tests/ansible/tests/utils_test.py new file mode 100644 index 00000000..05ee8bf0 --- /dev/null +++ b/tests/ansible/tests/utils_test.py @@ -0,0 +1,11 @@ +import unittest + +import ansible_mitogen.utils + + +class AnsibleVersionTest(unittest.TestCase): + def test_ansible_version(self): + self.assertIsInstance(ansible_mitogen.utils.ansible_version, tuple) + self.assertIsInstance(ansible_mitogen.utils.ansible_version[0], int) + self.assertIsInstance(ansible_mitogen.utils.ansible_version[1], int) + self.assertEqual(2, ansible_mitogen.utils.ansible_version[0])