9173aaca590df50bbaa6122bc744291617f36b90,nilearn/_utils/testing.py,,are_tests_running,#,246

Before Change


    // Now check that we have the loader in the call stask
    stack = inspect.stack()
    loader_file_name = nose.loader.__file__
    if loader_file_name.endswith(".pyc"):
        loader_file_name = loader_file_name[:-1]
    for _, file_name, _, _, _, _ in stack:
        if file_name == loader_file_name:
            return True
    return False

After Change


def are_tests_running():
    Returns whether we are running the pytest test loader
    
    return "PYTEST_CURRENT_TEST" in os.environ


def skip_if_running_tests(msg=""):
     Raise a SkipTest if we appear to be running the pytest test loader.
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 5

Instances


Project Name: nilearn/nilearn
Commit Name: 9173aaca590df50bbaa6122bc744291617f36b90
Time: 2020-01-09
Author: kc.insight.pi@gmail.com
File Name: nilearn/_utils/testing.py
Class Name:
Method Name: are_tests_running


Project Name: HazyResearch/fonduer
Commit Name: 7d9e3957ba4be2e1405f574537bf054a4e61603f
Time: 2020-06-17
Author: senwu@cs.stanford.edu
File Name: src/fonduer/parser/visual_linker.py
Class Name: VisualLinker
Method Name: is_linkable


Project Name: dnouri/skorch
Commit Name: 2760c1077478cb4e50c736bf1126006bb0aeaab0
Time: 2017-11-17
Author: marian.tietz@ottogroup.com
File Name: skorch/net.py
Class Name: NeuralNet
Method Name: _get_params_for


Project Name: akkana/scripts
Commit Name: c8eee0b3fa6395f90bdf33acbeacf72711dae3c5
Time: 2018-04-28
Author: akkana@shallowsky.com
File Name: quickbrowse.py
Class Name: BrowserWindow
Method Name: load_url