Back to index

python3.2  3.2.2
Public Member Functions
test.test_base64.TestMain Class Reference

List of all members.

Public Member Functions

def get_output
def test_encode_decode
def test_encode_file
def test_decode

Detailed Description

Definition at line 229 of file test_base64.py.


Member Function Documentation

def test.test_base64.TestMain.get_output (   self,
  args,
  options 
)

Definition at line 230 of file test_base64.py.

00230 
00231     def get_output(self, *args, **options):
00232         args = (sys.executable, '-m', 'base64') + args
00233         return subprocess.check_output(args, **options)

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 253 of file test_base64.py.

00253 
00254     def test_decode(self):
00255         with open(support.TESTFN, 'wb') as fp:
00256             fp.write(b'Yf9iCg==')
00257         output = self.get_output('-d', support.TESTFN)
00258         self.assertEqual(output.rstrip(), b'a\xffb')
00259 
00260 

Here is the call graph for this function:

Definition at line 234 of file test_base64.py.

00234 
00235     def test_encode_decode(self):
00236         output = self.get_output('-t')
00237         self.assertSequenceEqual(output.splitlines(), (
00238             b"b'Aladdin:open sesame'",
00239             br"b'QWxhZGRpbjpvcGVuIHNlc2FtZQ==\n'",
00240             b"b'Aladdin:open sesame'",
00241         ))

Here is the call graph for this function:

Definition at line 242 of file test_base64.py.

00242 
00243     def test_encode_file(self):
00244         with open(support.TESTFN, 'wb') as fp:
00245             fp.write(b'a\xffb\n')
00246 
00247         output = self.get_output('-e', support.TESTFN)
00248         self.assertEqual(output.rstrip(), b'Yf9iCg==')
00249 
00250         with open(support.TESTFN, 'rb') as fp:
00251             output = self.get_output('-e', stdin=fp)
00252         self.assertEqual(output.rstrip(), b'Yf9iCg==')

Here is the call graph for this function:


The documentation for this class was generated from the following file: