From 0725b627f581f00c66ac493b07169202f2ef098c Mon Sep 17 00:00:00 2001 From: Daira Hopwood Date: Mon, 2 Nov 2015 21:42:42 +0000 Subject: [PATCH] test_encodingutil: use self.patch rather than modifying encodingutil.io_encoding directly. Signed-off-by: Daira Hopwood --- src/allmydata/test/test_encodingutil.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/allmydata/test/test_encodingutil.py b/src/allmydata/test/test_encodingutil.py index 1b700e99..9d6fe8f3 100644 --- a/src/allmydata/test/test_encodingutil.py +++ b/src/allmydata/test/test_encodingutil.py @@ -400,13 +400,13 @@ class QuoteOutput(ReallyEqualMixin, unittest.TestCase): check(u"\n", u"\"\\x0a\"", quote_newlines=True) def test_quote_output_default(self): - encodingutil.io_encoding = 'ascii' + self.patch(encodingutil, 'io_encoding', 'ascii') self.test_quote_output_ascii(None) - encodingutil.io_encoding = 'latin1' + self.patch(encodingutil, 'io_encoding', 'latin1') self.test_quote_output_latin1(None) - encodingutil.io_encoding = 'utf-8' + self.patch(encodingutil, 'io_encoding', 'utf-8') self.test_quote_output_utf8(None) -- 2.45.2