From 6bba290f68b2303eb2f1ca33c336606b1e4ff0eb Mon Sep 17 00:00:00 2001 From: Vasily Litvinov Date: Tue, 24 Nov 2020 17:09:32 +0300 Subject: [PATCH] Fix all tests on Windows Signed-off-by: Vasily Litvinov --- recipe/meta.yaml | 1 + recipe/patches/0001-Switch-to-blessed.patch | 2 +- .../0002-Do-not-use-signal-on-Windows.patch | 2 +- ...value-for-time-formatting-on-Windows.patch | 2 +- .../patches/0004-Replace-CRLF-with-LF.patch | 26 +++++++++++++++++++ 5 files changed, 30 insertions(+), 3 deletions(-) create mode 100644 recipe/patches/0004-Replace-CRLF-with-LF.patch diff --git a/recipe/meta.yaml b/recipe/meta.yaml index ecf6eec..7dbae0b 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -12,6 +12,7 @@ source: - patches/0001-Switch-to-blessed.patch - patches/0002-Do-not-use-signal-on-Windows.patch - patches/0003-Use-default-value-for-time-formatting-on-Windows.patch + - patches/0004-Replace-CRLF-with-LF.patch build: noarch: python diff --git a/recipe/patches/0001-Switch-to-blessed.patch b/recipe/patches/0001-Switch-to-blessed.patch index f7fde83..e222194 100644 --- a/recipe/patches/0001-Switch-to-blessed.patch +++ b/recipe/patches/0001-Switch-to-blessed.patch @@ -1,7 +1,7 @@ From 8265e2bfb4f22d370ac9d65dde08318dc2081bbc Mon Sep 17 00:00:00 2001 From: Vasily Litvinov Date: Tue, 24 Nov 2020 16:24:42 +0300 -Subject: [PATCH 1/3] Switch to blessed +Subject: [PATCH 1/4] Switch to blessed Signed-off-by: Litvinov --- diff --git a/recipe/patches/0002-Do-not-use-signal-on-Windows.patch b/recipe/patches/0002-Do-not-use-signal-on-Windows.patch index de6610a..6e07d4c 100644 --- a/recipe/patches/0002-Do-not-use-signal-on-Windows.patch +++ b/recipe/patches/0002-Do-not-use-signal-on-Windows.patch @@ -1,7 +1,7 @@ From 328216a1558c0ffd0fb9b2d13b9469946a566286 Mon Sep 17 00:00:00 2001 From: Vasily Litvinov Date: Tue, 24 Nov 2020 16:36:23 +0300 -Subject: [PATCH 2/3] Do not use signal on Windows +Subject: [PATCH 2/4] Do not use signal on Windows Signed-off-by: Vasily Litvinov --- diff --git a/recipe/patches/0003-Use-default-value-for-time-formatting-on-Windows.patch b/recipe/patches/0003-Use-default-value-for-time-formatting-on-Windows.patch index 190369b..f58a527 100644 --- a/recipe/patches/0003-Use-default-value-for-time-formatting-on-Windows.patch +++ b/recipe/patches/0003-Use-default-value-for-time-formatting-on-Windows.patch @@ -1,7 +1,7 @@ From a1d8dde8849cd9bfd089fd667fe9e20e9122f9e8 Mon Sep 17 00:00:00 2001 From: Vasily Litvinov Date: Tue, 24 Nov 2020 16:48:07 +0300 -Subject: [PATCH 3/3] Use default value for time formatting on Windows +Subject: [PATCH 3/4] Use default value for time formatting on Windows Signed-off-by: Vasily Litvinov --- diff --git a/recipe/patches/0004-Replace-CRLF-with-LF.patch b/recipe/patches/0004-Replace-CRLF-with-LF.patch new file mode 100644 index 0000000..14ffde2 --- /dev/null +++ b/recipe/patches/0004-Replace-CRLF-with-LF.patch @@ -0,0 +1,26 @@ +From 8ebc2fb1977eccc188c86d9582e1212f7bbe29c0 Mon Sep 17 00:00:00 2001 +From: Vasily Litvinov +Date: Tue, 24 Nov 2020 17:01:34 +0300 +Subject: [PATCH 4/4] Replace CRLF with LF + +Signed-off-by: Vasily Litvinov +--- + gpustat/test_gpustat.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/gpustat/test_gpustat.py b/gpustat/test_gpustat.py +index 35244e3..8ef9bd2 100644 +--- a/gpustat/test_gpustat.py ++++ b/gpustat/test_gpustat.py +@@ -173,7 +173,7 @@ def remove_ansi_codes(s): + import re + s = re.compile(r'\x1b[^m]*m').sub('', s) + s = re.compile(r'\x0f').sub('', s) +- return s ++ return s.replace('\r\n', '\n') + + + class TestGPUStat(unittest.TestCase): +-- +2.29.2.windows.2 +