From 1c39245af8553cfc4ae5be229404f8ddcdeeae9d Mon Sep 17 00:00:00 2001 From: Yohan Boniface Date: Mon, 27 Feb 2023 13:50:37 +0100 Subject: [PATCH] iwyu --- umap/tests/test_utils.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 umap/tests/test_utils.py diff --git a/umap/tests/test_utils.py b/umap/tests/test_utils.py new file mode 100644 index 00000000..85862a03 --- /dev/null +++ b/umap/tests/test_utils.py @@ -0,0 +1,14 @@ +from pathlib import Path + +from umap.utils import gzip_file + + +def test_gzip_file(): + # Let's use any old file so we can check that the date of the gzip file is set. + src = Path(__file__).parent / "settings.py" + dest = Path("/tmp/test_settings.py.gz") + gzip_file(src, dest) + src_stat = src.stat() + dest_stat = dest.stat() + dest.unlink() + assert src_stat.st_mtime == dest_stat.st_mtime