1fa5396d1ee69a0006489d0c6caa7a8ec644a904,bin/test_external_imports.py,,,#,87

Before Change



    print("No unexpected external modules were imported with "from sympy import *"!")

if __name__ == "__main__":
    test_external_imports()

After Change


this_path = os.path.abspath(__file__)
this_dir = os.path.dirname(this_path)
sympy_top = os.path.split(this_dir)[0]
sympy_dir = os.path.join(sympy_top, "sympy")

if os.path.isdir(sympy_dir):
    sys.path.insert(0, sympy_top)

def test_external_imports():
    exec("from sympy import *", {})

    bad = []
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: sympy/sympy
Commit Name: 1fa5396d1ee69a0006489d0c6caa7a8ec644a904
Time: 2020-12-09
Author: oscar.j.benjamin@gmail.com
File Name: bin/test_external_imports.py
Class Name:
Method Name:


Project Name: ray-project/ray
Commit Name: baa053496a78bbb89279847277e49242f721af0e
Time: 2020-05-26
Author: sven@anyscale.io
File Name: rllib/tests/run_regression_tests.py
Class Name:
Method Name:


Project Name: sympy/sympy
Commit Name: 1fa5396d1ee69a0006489d0c6caa7a8ec644a904
Time: 2020-12-09
Author: oscar.j.benjamin@gmail.com
File Name: bin/test_external_imports.py
Class Name:
Method Name:


Project Name: eth-cscs/reframe
Commit Name: ac9081f85e0f54b0830b7f05593955a837eba7ce
Time: 2020-02-25
Author: karakasis@cscs.ch
File Name: reframe/core/pipeline.py
Class Name: RegressionTest
Method Name: _rfm_init