Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(5)  |  Call(5)  |  Derive(0)  |  Import(0)

src/m/o/modulegraph-0.11.1/modulegraph_tests/test_modulegraph.py   modulegraph(Download)
        [x for x in range(4)]
        """), "path4/index.py", 'exec', 0, 1)
        co = graph.replace_paths_in_code(co)
        self.assertEqual(co.co_filename, 'path4/index.py')
 
        """), "path1/index.py", 'exec', 0, 1)
        self.assertEqual(co.co_filename, 'path1/index.py')
        co = graph.replace_paths_in_code(co)
        self.assertEqual(co.co_filename, 'path2/index.py')
        for c in co.co_consts:
        [x for x in range(4)]
        """), "path3/path4/index.py", 'exec', 0, 1)
        co = graph.replace_paths_in_code(co)
        self.assertEqual(co.co_filename, 'path3/path4/index.py')
 
        co = compile(textwrap.dedent("""
        [x for x in range(4)]
        """), "path3/path5.py", 'exec', 0, 1)
        co = graph.replace_paths_in_code(co)
        [x for x in range(4)]
        """), "path3/path5/index.py", 'exec', 0, 1)
        co = graph.replace_paths_in_code(co)
        self.assertEqual(co.co_filename, 'path4/index.py')