From e0c83cf1f472dc767cbc3be7909922861e670bcc Mon Sep 17 00:00:00 2001 From: Dieter Baron Date: Wed, 20 Mar 2024 10:18:34 +0100 Subject: [PATCH] Fix @SANDBOX@ substitution in file names on Windows. --- CMakeLists.txt | 2 +- NEWS.md | 4 ++++ nihtest/File.py | 4 +--- nihtest/__main__.py | 2 +- pyproject.toml | 4 ++-- 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 02c4fae..876565f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.12) # Also update version in nihtest/__main__.py and pyproject.toml project(nihtest - VERSION 1.5.1 + VERSION 1.5.2 DESCRIPTION "NiH testing framework" HOMEPAGE_URL "https://github.com/nih-at/nihtest" LANGUAGES C) diff --git a/NEWS.md b/NEWS.md index 19a2996..45d84cc 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,7 @@ +# 1.5.2 [2024-03-20] + +- Fix @SANDBOX@ substitution in file names on Windows. + # 1.5.1 [2024-03-15] - Fix preload test with newer glibc. diff --git a/nihtest/File.py b/nihtest/File.py index 2dbad5e..68033b1 100644 --- a/nihtest/File.py +++ b/nihtest/File.py @@ -1,6 +1,5 @@ import os import pathlib -import re import shutil from nihtest import Command @@ -8,7 +7,6 @@ from nihtest import Configuration from nihtest import Utility -sandbox = re.compile("@SANDBOX@") class Data: def __init__(self, file_name, data=None): @@ -23,7 +21,7 @@ def __init__(self, name, input=None, result=None): self.result = result def file_name(self, directory): - return sandbox.sub(os.path.abspath(directory), self.name) + return self.name.replace("@SANDBOX@", os.path.abspath(directory)) def compare(self, configuration, directory): if not self.result: diff --git a/nihtest/__main__.py b/nihtest/__main__.py index 2c8fa08..8ebf62f 100644 --- a/nihtest/__main__.py +++ b/nihtest/__main__.py @@ -4,7 +4,7 @@ from nihtest import Test from nihtest import Configuration -VERSION = "1.5.1" +VERSION = "1.5.2" def main(): diff --git a/pyproject.toml b/pyproject.toml index 435f68f..7206b47 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "nihtest" -version = "1.5.1" +version = "1.5.2" authors = [ { name="Dieter Baron", email="dillo@nih.at" }, { name="Thomas Klausner", email="wiz@gatalith.at"} @@ -30,7 +30,7 @@ dependencies = [ nihtest = "nihtest.__main__:main" [tool.bumpver] -current_version = "1.5.1" +current_version = "1.5.2" version_pattern = "MAJOR.MINOR.PATCH" [tool.bumpver.file_patterns]