From c55198095f0aafed19f401eedce8d8c7a183b379 Mon Sep 17 00:00:00 2001 From: Jon Riehl Date: Thu, 6 Jun 2013 14:04:48 -0500 Subject: [PATCH] Modified FlowTestMixin.build_and_test_flow() to return generated flow for further testing. --- llpython/tests/test_byte_flow.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/llpython/tests/test_byte_flow.py b/llpython/tests/test_byte_flow.py index 471813e..8c4decb 100644 --- a/llpython/tests/test_byte_flow.py +++ b/llpython/tests/test_byte_flow.py @@ -46,9 +46,11 @@ class FlowTestMixin(object): (self.valid_addrs - self.visited)) del self.visited del self.valid_addrs + return flow def build_and_test_flow(self, func): - self.fail_unless_valid_flow(self.BUILDER_CLS.build_flow(func), func) + return self.fail_unless_valid_flow( + self.BUILDER_CLS.build_flow(func), func) def test_doslice(self): self.build_and_test_flow(llfuncs.doslice) @@ -80,6 +82,7 @@ class FlowTestMixin(object): # ______________________________________________________________________ class TestBytecodeFlowBuilder(unittest.TestCase, FlowTestMixin): + BUILDER_CLS = byte_flow.BytecodeFlowBuilder def fail_unless_valid_instruction(self, instr):