From 61ec384bb50b74e83c31a2f5ee068eb1241da8c4 Mon Sep 17 00:00:00 2001 From: Andrew Moffat Date: Thu, 9 Feb 2023 09:26:55 -0800 Subject: [PATCH] fixing tests --- sh.py | 2 +- tests/test.py | 9 --------- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/sh.py b/sh.py index 637091a9..dd9cb13d 100644 --- a/sh.py +++ b/sh.py @@ -309,7 +309,7 @@ def __reduce__(self): return self.__class__, (self.full_cmd, self.stdout, self.stderr, self.truncate) def __init__(self, full_cmd, stdout, stderr, truncate=True): - self.exit_code = None + self.exit_code = self.exit_code self.full_cmd = full_cmd self.stdout = stdout self.stderr = stderr diff --git a/tests/test.py b/tests/test.py index 3eb35bbe..798a7b10 100644 --- a/tests/test.py +++ b/tests/test.py @@ -2503,15 +2503,6 @@ def test_decode_error_handling(self): ) self.assertEqual(p, "test") - p = python( - py.name, - _encoding="ascii", - _decode_errors="ignore", - _out=sys.stdout, - _tee=True, - ) - self.assertEqual(p, "test") - def test_signal_exception(self): from sh import SignalException_15