pypy / rpython / flowspace / test / test_generator.py

Diff from to

rpython/flowspace/test/test_generator.py

-from rpython.conftest import option
+import py
 from rpython.flowspace.objspace import FlowObjSpace
 from rpython.flowspace.model import Variable
 from rpython.flowspace.generator import (make_generatoriterator_class,
             yield n
         #
         graph = FlowObjSpace().build_flow(func)
-        if option.view:
+        if py.test.config.option.view:
             graph.show()
         block = graph.startblock
         ops = block.operations
         GeneratorIterator = make_generatoriterator_class(graph)
         replace_graph_with_bootstrap(GeneratorIterator, graph)
         func1 = attach_next_method(GeneratorIterator, graph)
-        if option.view:
+        if py.test.config.option.view:
             graph.show()
         #
         assert func1._generator_next_method_of_ is GeneratorIterator
         #
         graph_next = space.build_flow(GeneratorIterator.next.im_func)
         join_blocks(graph_next)
-        if option.view:
+        if py.test.config.option.view:
             graph_next.show()
         #
         graph1 = space.build_flow(func1)
-        if option.view:
+        if py.test.config.option.view:
             graph1.show()
 
     def test_automatic(self):
             z -= 10
         #
         graph = FlowObjSpace().build_flow(f)
-        if option.view:
+        if py.test.config.option.view:
             graph.show()
         block = graph.startblock
         assert len(block.exits) == 1
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.