1
- from test import support
2
1
import unittest
3
2
4
- import sys , os , io , subprocess
3
+ import sys , os , io
5
4
import quopri
6
5
7
6
@@ -193,7 +192,8 @@ def test_decode_header(self):
193
192
for p , e in self .HSTRINGS :
194
193
self .assertEqual (quopri .decodestring (e , header = True ), p )
195
194
196
- def _test_scriptencode (self ):
195
+ @unittest .skip ("requires subprocess" )
196
+ def test_scriptencode (self ):
197
197
(p , e ) = self .STRINGS [- 1 ]
198
198
process = subprocess .Popen (
199
199
[sys .executable , "-mquopri" ], stdin = subprocess .PIPE , stdout = subprocess .PIPE
@@ -210,7 +210,8 @@ def _test_scriptencode(self):
210
210
self .assertEqual (cout [i ], e [i ])
211
211
self .assertEqual (cout , e )
212
212
213
- def _test_scriptdecode (self ):
213
+ @unittest .skip ("requires subprocess" )
214
+ def test_scriptdecode (self ):
214
215
(p , e ) = self .STRINGS [- 1 ]
215
216
process = subprocess .Popen (
216
217
[sys .executable , "-mquopri" , "-d" ], stdin = subprocess .PIPE , stdout = subprocess .PIPE
@@ -220,11 +221,3 @@ def _test_scriptdecode(self):
220
221
cout = cout .decode ("latin-1" )
221
222
p = p .decode ("latin-1" )
222
223
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