11import unittest
2- from test import support
32import base64
43import binascii
54import os
65from array import array
6+ from test .support import os_helper
77from test .support import script_helper
88
99
@@ -647,8 +647,8 @@ def test_ErrorHeritage(self):
647647
648648class TestMain (unittest .TestCase ):
649649 def tearDown (self ):
650- if os .path .exists (support .TESTFN ):
651- os .unlink (support .TESTFN )
650+ if os .path .exists (os_helper .TESTFN ):
651+ os .unlink (os_helper .TESTFN )
652652
653653 def get_output (self , * args ):
654654 return script_helper .assert_python_ok ('-m' , 'base64' , * args ).out
@@ -662,9 +662,9 @@ def test_encode_decode(self):
662662 ))
663663
664664 def test_encode_file (self ):
665- with open (support .TESTFN , 'wb' ) as fp :
665+ with open (os_helper .TESTFN , 'wb' ) as fp :
666666 fp .write (b'a\xff b\n ' )
667- output = self .get_output ('-e' , support .TESTFN )
667+ output = self .get_output ('-e' , os_helper .TESTFN )
668668 self .assertEqual (output .rstrip (), b'Yf9iCg==' )
669669
670670 def test_encode_from_stdin (self ):
@@ -674,9 +674,9 @@ def test_encode_from_stdin(self):
674674 self .assertIsNone (err )
675675
676676 def test_decode (self ):
677- with open (support .TESTFN , 'wb' ) as fp :
677+ with open (os_helper .TESTFN , 'wb' ) as fp :
678678 fp .write (b'Yf9iCg==' )
679- output = self .get_output ('-d' , support .TESTFN )
679+ output = self .get_output ('-d' , os_helper .TESTFN )
680680 self .assertEqual (output .rstrip (), b'a\xff b' )
681681
682682if __name__ == '__main__' :
0 commit comments