Path 1: 14 calls (0.54)

'/Users/andrehora/Documents/git/projects-pathspotter/pylint/tests/input' (14)

'/Users/andrehora/Documents/git/projects-pathspotter/pylint/tests/messages' (14)

'i0013' (2) 'i0022' (2) 'i0012' (2) 'noerror' (2) 'i0011' (2) 'i0020' (2) 'i0014' (2)

'.py' (14)

[] (14)

1def _get_tests_info(
2    input_dir: str, msg_dir: str, prefix: str, suffix: str
3) -> list[tuple[str, str]]:
4    """Get python input examples and output messages.
5
6    We use following conventions for input files and messages:
7    for different inputs:
8        test for python  >= x.y    ->  input   =  <name>_pyxy.py
9        test for python  <  x.y    ->  input   =  <name>_py_xy.py
10    for one input and different messages:
11        message for python >=  x.y ->  message =  <name>_pyxy.txt
12        lower versions             ->  message with highest num
13    """
14    result = []
15    for fname in glob(join(input_dir, prefix + "*" + suffix)):
16        infile = basename(fname)
17        fbase = splitext(infile)[0]
18        # filter input files :
19        pyrestr = fbase.rsplit("_py", 1)[-1]  # like _26 or 26
20        if pyrestr.isdigit():  # '24', '25'...
21            if pyrestr.isdigit() and int(SYS_VERS_STR) < int(pyrestr):
22                continue
23        if pyrestr.startswith("_") and pyrestr[1:].isdigit():
24            # skip test for higher python versions
25            if pyrestr[1:].isdigit() and int(SYS_VERS_STR) >= int(pyrestr[1:]):
26                continue
27        messages = glob(join(msg_dir, fbase + "*.txt"))
28        # the last one will be without ext, i.e. for all or upper versions:
29        if messages:
30            for outfile in sorted(messages, reverse=True):
31                py_rest = outfile.rsplit("_py", 1)[-1][:-4]
32                if py_rest.isdigit() and int(SYS_VERS_STR) >= int(py_rest):
33                    break
34        else:
35            # This will provide an error message indicating the missing filename.
36            outfile = join(msg_dir, fbase + ".txt")
37        result.append((infile, outfile))
38    return result
            

Path 2: 10 calls (0.38)

'/Users/andrehora/Documents/git/projects-pathspotter/pylint/tests/input' (10)

'/Users/andrehora/Documents/git/projects-pathspotter/pylint/tests/messages' (10)

'w0401' (8) 'w0801' (2)

'.py' (10)

list (10)

1def _get_tests_info(
2    input_dir: str, msg_dir: str, prefix: str, suffix: str
3) -> list[tuple[str, str]]:
4    """Get python input examples and output messages.
5
6    We use following conventions for input files and messages:
7    for different inputs:
8        test for python  >= x.y    ->  input   =  <name>_pyxy.py
9        test for python  <  x.y    ->  input   =  <name>_py_xy.py
10    for one input and different messages:
11        message for python >=  x.y ->  message =  <name>_pyxy.txt
12        lower versions             ->  message with highest num
13    """
14    result = []
15    for fname in glob(join(input_dir, prefix + "*" + suffix)):
16        infile = basename(fname)
17        fbase = splitext(infile)[0]
18        # filter input files :
19        pyrestr = fbase.rsplit("_py", 1)[-1]  # like _26 or 26
20        if pyrestr.isdigit():  # '24', '25'...
21            if pyrestr.isdigit() and int(SYS_VERS_STR) < int(pyrestr):
22                continue
23        if pyrestr.startswith("_") and pyrestr[1:].isdigit():
24            # skip test for higher python versions
25            if pyrestr[1:].isdigit() and int(SYS_VERS_STR) >= int(pyrestr[1:]):
26                continue
27        messages = glob(join(msg_dir, fbase + "*.txt"))
28        # the last one will be without ext, i.e. for all or upper versions:
29        if messages:
30            for outfile in sorted(messages, reverse=True):
31                py_rest = outfile.rsplit("_py", 1)[-1][:-4]
32                if py_rest.isdigit() and int(SYS_VERS_STR) >= int(py_rest):
33                    break
34        else:
35            # This will provide an error message indicating the missing filename.
36            outfile = join(msg_dir, fbase + ".txt")
37        result.append((infile, outfile))
38    return result
            

Path 3: 2 calls (0.08)

'/Users/andrehora/Documents/git/projects-pathspotter/pylint/tests/input' (2)

'/Users/andrehora/Documents/git/projects-pathspotter/pylint/tests/messages' (2)

'func_' (2)

'' (2)

list (2)

1def _get_tests_info(
2    input_dir: str, msg_dir: str, prefix: str, suffix: str
3) -> list[tuple[str, str]]:
4    """Get python input examples and output messages.
5
6    We use following conventions for input files and messages:
7    for different inputs:
8        test for python  >= x.y    ->  input   =  <name>_pyxy.py
9        test for python  <  x.y    ->  input   =  <name>_py_xy.py
10    for one input and different messages:
11        message for python >=  x.y ->  message =  <name>_pyxy.txt
12        lower versions             ->  message with highest num
13    """
14    result = []
15    for fname in glob(join(input_dir, prefix + "*" + suffix)):
16        infile = basename(fname)
17        fbase = splitext(infile)[0]
18        # filter input files :
19        pyrestr = fbase.rsplit("_py", 1)[-1]  # like _26 or 26
20        if pyrestr.isdigit():  # '24', '25'...
21            if pyrestr.isdigit() and int(SYS_VERS_STR) < int(pyrestr):
22                continue
23        if pyrestr.startswith("_") and pyrestr[1:].isdigit():
24            # skip test for higher python versions
25            if pyrestr[1:].isdigit() and int(SYS_VERS_STR) >= int(pyrestr[1:]):
26                continue
27        messages = glob(join(msg_dir, fbase + "*.txt"))
28        # the last one will be without ext, i.e. for all or upper versions:
29        if messages:
30            for outfile in sorted(messages, reverse=True):
31                py_rest = outfile.rsplit("_py", 1)[-1][:-4]
32                if py_rest.isdigit() and int(SYS_VERS_STR) >= int(py_rest):
33                    break
34        else:
35            # This will provide an error message indicating the missing filename.
36            outfile = join(msg_dir, fbase + ".txt")
37        result.append((infile, outfile))
38    return result