diff --git a/CMakeLists.txt b/CMakeLists.txt index 9451fb4..9b63bd5 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.1.1 + VERSION 1.2.0 DESCRIPTION "NiH testing framework" HOMEPAGE_URL "https://github.com/nih-at/nihtest" LANGUAGES C) diff --git a/NEWS.md b/NEWS.md index fcea3cf..b923e2c 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,7 @@ +# 1.2.0 [2023-07-19] + +- Explicitly specify encoding for stdout of subcommands. + # 1.1.1 [2023-06-27] - Fix Windows compatibility. diff --git a/nihtest/Command.py b/nihtest/Command.py index 67b6d03..6e623d1 100644 --- a/nihtest/Command.py +++ b/nihtest/Command.py @@ -26,9 +26,9 @@ def run(self): raise RuntimeError(f"can't find program {self.program}") if self.stdin_file is not None: with open(self.stdin_file, "rb") as stdin: - result = subprocess.run([program] + self.arguments, capture_output=True, check=False, text=True, stdin=stdin, env=self.environment) + result = subprocess.run([program] + self.arguments, capture_output=True, check=False, text=True, encoding="utf-8", stdin=stdin, env=self.environment) else: - result = subprocess.run([program] + self.arguments, capture_output=True, check=False, text=True, input=self.stdin, env=self.environment) + result = subprocess.run([program] + self.arguments, capture_output=True, check=False, text=True, encoding="utf-8", input=self.stdin, env=self.environment) self.exit_code = result.returncode self.stdout = result.stdout.splitlines() self.stderr = result.stderr.splitlines() diff --git a/nihtest/__main__.py b/nihtest/__main__.py index 98cb1be..d7f2023 100644 --- a/nihtest/__main__.py +++ b/nihtest/__main__.py @@ -4,7 +4,7 @@ from nihtest import Test from nihtest import Configuration -VERSION = "1.1.1" +VERSION = "1.2.0" def main(): diff --git a/pyproject.toml b/pyproject.toml index a1c4c0b..7082d45 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "nihtest" -version = "1.1.1" +version = "1.2.0" authors = [ { name="Dieter Baron", email="dillo@nih.at" }, { name="Thomas Klausner", email="wiz@gatalith.at"} @@ -27,7 +27,7 @@ classifiers = [ nihtest = "nihtest.__main__:main" [tool.bumpver] -current_version = "1.1.1" +current_version = "1.2.0" version_pattern = "MAJOR.MINOR.PATCH" [tool.bumpver.file_patterns]