@@ -26,11 +26,7 @@
Loading
26 26
27 27
fmlogger = logging.getLogger("nipype.utils")
28 28
29 -
related_filetype_sets = [
30 -
    (".hdr", ".img", ".mat"),
31 -
    (".nii", ".mat"),
32 -
    (".BRIK", ".HEAD"),
33 -
]
29 +
related_filetype_sets = [(".hdr", ".img", ".mat"), (".nii", ".mat"), (".BRIK", ".HEAD")]
34 30
35 31
36 32
def _resolve_with_filenotfound(path, **kwargs):
@@ -876,7 +872,7 @@
Loading
876 872
877 873
878 874
def canonicalize_env(env):
879 -
    """Windows requires that environment be dicts with bytes as keys and values
875 +
    """Windows requires that environment be dicts with str as keys and values
880 876
    This function converts any unicode entries for Windows only, returning the
881 877
    dictionary untouched in other environments.
882 878
@@ -888,7 +884,7 @@
Loading
888 884
    Returns
889 885
    -------
890 886
    env : dict
891 -
        Windows: environment dictionary with bytes keys and values
887 +
        Windows: environment dictionary with str keys and values
892 888
        Other: untouched input ``env``
893 889
    """
894 890
    if os.name != "nt":
@@ -896,10 +892,10 @@
Loading
896 892
897 893
    out_env = {}
898 894
    for key, val in env.items():
899 -
        if not isinstance(key, bytes):
900 -
            key = key.encode("utf-8")
901 -
        if not isinstance(val, bytes):
902 -
            val = val.encode("utf-8")
895 +
        if not isinstance(key, str):
896 +
            key = key.decode("utf-8")
897 +
        if not isinstance(val, str):
898 +
            val = val.decode("utf-8")
903 899
        out_env[key] = val
904 900
    return out_env
905 901

@@ -26,7 +26,7 @@
Loading
26 26
from ... import config, logging, LooseVersion
27 27
from ...utils.provenance import write_provenance
28 28
from ...utils.misc import str2bool, rgetcwd
29 -
from ...utils.filemanip import split_filename, which, get_dependencies
29 +
from ...utils.filemanip import split_filename, which, get_dependencies, canonicalize_env
30 30
from ...utils.subprocess import run_command
31 31
32 32
from ...external.due import due
@@ -778,7 +778,7 @@
Loading
778 778
            proc = sp.Popen(
779 779
                " ".join((cmd, flag)),
780 780
                shell=True,
781 -
                env=env,
781 +
                env=canonicalize_env(env),
782 782
                stdout=sp.PIPE,
783 783
                stderr=sp.PIPE,
784 784
            )
Files Coverage
nipype 64.70%
Project Totals (302 files) 64.70%
12103.0
CIRCLE_JOB=test_pytest
unittests
1
coverage:
2
  range: "0...100"
3
  status:
4
    patch:
5
      default:
6
        target: 0
7
        threshold: 100
8
    project:
9
      default:
10
        target: 0
11
        threshold: 100
12
      patch:
13
        target: 0
14
        threshold: 100
15
      unittests:
16
        target: 0
17
        threshold: 100
18
        flags:
19
          - "unittests"
20
      smoketests:
21
        target: 0
22
        threshold: 100
23
        flags:
24
          - "smoketests"
25
  ignore:          # files and folders that will be removed during processing
26
    - "nipype/external"
27
    - "tools"
28
    - "doc"
29
    - "**/tests"
30
    - "examples"
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading