From 9cd01e2050407cd04783897cdd324f6958e8b401 Mon Sep 17 00:00:00 2001 From: Rodrigo Tobar Date: Sat, 25 Nov 2023 23:27:51 +0800 Subject: [PATCH] Fix Windows detection The previous logic included "darwin" (i.e., macOS) and "cigwin", so it wasn't really good at spotting what we wanted to. Signed-off-by: Rodrigo Tobar --- test/test_dump.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_dump.py b/test/test_dump.py index ac51cda..c6f3d90 100644 --- a/test/test_dump.py +++ b/test/test_dump.py @@ -14,7 +14,7 @@ def _do_test_dump(self, method, multiple_values): env['IJSON_BACKEND'] = 'python' # Ensure printing works on the subprocess in Windows # by using utf-8 on its stdout - if 'win' in sys.platform: + if sys.platform == 'win32': env = dict(os.environ) env['PYTHONIOENCODING'] = 'utf-8' cmd = [sys.executable, '-m', 'ijson.dump', '-m', method, '-p', '']