Exemplo n.º 1
0
def test_show_code(stream_fixture):
    dis.show_code(TEST_SOURCE_CODE, file=stream_fixture)
    actual = stream_fixture.getvalue()
    assert actual == EXPECTED_CODE_INFO + '\n'
Exemplo n.º 2
0
 def test_show_code(self):
     self.maxDiff = 1000
     for x, expected in self.test_pairs:
         with captured_stdout() as output:
             dis.show_code(x)
         self.assertRegex(output.getvalue(), expected+"\n")
Exemplo n.º 3
0
 def test_show_code(self):
     self.maxDiff = 1000
     for x, expected in self.test_pairs:
         with captured_stdout() as output:
             dis.show_code(x)
         self.assertRegex(output.getvalue(), expected + "\n")
Exemplo n.º 4
0
def test_show_code(stream_fixture):
    dis.show_code(TEST_SOURCE_CODE, file=stream_fixture)
    actual = stream_fixture.getvalue()
    assert actual == EXPECTED_CODE_INFO + '\n'