summaryrefslogtreecommitdiffstats
path: root/test/test_prerun.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 00:24:37 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 00:24:37 +0000
commit1022b2cebe73db426241c2f420d4ee9f6f3c1bed (patch)
treea5c38ccfaa66e8a52767dec01d3598b67a7422a8 /test/test_prerun.py
parentInitial commit. (diff)
downloadpython-ansible-compat-1022b2cebe73db426241c2f420d4ee9f6f3c1bed.tar.xz
python-ansible-compat-1022b2cebe73db426241c2f420d4ee9f6f3c1bed.zip
Adding upstream version 4.1.11.upstream/4.1.11
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'test/test_prerun.py')
-rw-r--r--test/test_prerun.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/test_prerun.py b/test/test_prerun.py
new file mode 100644
index 0000000..1549756
--- /dev/null
+++ b/test/test_prerun.py
@@ -0,0 +1,11 @@
+"""Tests for ansible_compat.prerun module."""
+from pathlib import Path
+
+from ansible_compat.prerun import get_cache_dir
+
+
+def test_get_cache_dir_relative() -> None:
+ """Test behaviors of get_cache_dir."""
+ relative_path = Path()
+ abs_path = relative_path.resolve()
+ assert get_cache_dir(relative_path) == get_cache_dir(abs_path)