Skip to content

Commit 0b0e0cc

Browse files
committed
quopri: Remove dependency on test.support and subprocess in unit test.
Signed-off-by: Damien George <damien@micropython.org>
1 parent 2b3bd5b commit 0b0e0cc

File tree

1 file changed

+5
-12
lines changed

1 file changed

+5
-12
lines changed

python-stdlib/quopri/test_quopri.py

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
from test import support
21
import unittest
32

4-
import sys, os, io, subprocess
3+
import sys, os, io
54
import quopri
65

76

@@ -193,7 +192,8 @@ def test_decode_header(self):
193192
for p, e in self.HSTRINGS:
194193
self.assertEqual(quopri.decodestring(e, header=True), p)
195194

196-
def _test_scriptencode(self):
195+
@unittest.skip("requires subprocess")
196+
def test_scriptencode(self):
197197
(p, e) = self.STRINGS[-1]
198198
process = subprocess.Popen(
199199
[sys.executable, "-mquopri"], stdin=subprocess.PIPE, stdout=subprocess.PIPE
@@ -210,7 +210,8 @@ def _test_scriptencode(self):
210210
self.assertEqual(cout[i], e[i])
211211
self.assertEqual(cout, e)
212212

213-
def _test_scriptdecode(self):
213+
@unittest.skip("requires subprocess")
214+
def test_scriptdecode(self):
214215
(p, e) = self.STRINGS[-1]
215216
process = subprocess.Popen(
216217
[sys.executable, "-mquopri", "-d"], stdin=subprocess.PIPE, stdout=subprocess.PIPE
@@ -220,11 +221,3 @@ def _test_scriptdecode(self):
220221
cout = cout.decode("latin-1")
221222
p = p.decode("latin-1")
222223
self.assertEqual(cout.splitlines(), p.splitlines())
223-
224-
225-
def test_main():
226-
support.run_unittest(QuopriTestCase)
227-
228-
229-
if __name__ == "__main__":
230-
test_main()

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy