diff --git a/CHANGELOG b/CHANGELOG index b2de5382..8bcbe8db 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,5 @@ +0.62.3 + - fix: get_r_version string conversion not necessary 0.62.2 - fix: use full path to R executable when running lme4 analysis in rsetup - enh: properly catch CalledProcessError in run_command diff --git a/dclab/lme4/rsetup.py b/dclab/lme4/rsetup.py index 413362ce..d2167716 100644 --- a/dclab/lme4/rsetup.py +++ b/dclab/lme4/rsetup.py @@ -72,8 +72,8 @@ def get_r_version(): require_r() cmd = (str(get_r_path()), "--version") logger.debug(f"Looking for R version with: {' '.join(cmd)}") - tmp = run_command(cmd, stderr=sp.STDOUT) - r_version = tmp.decode("ascii", "ignore").split(os.linesep) + r_version = run_command(cmd, stderr=sp.STDOUT) + r_version = r_version.split(os.linesep) if r_version[0].startswith("WARNING"): r_version = r_version[1] else: diff --git a/tests/test_lme4.py b/tests/test_lme4.py index e425f8e0..f14e163c 100644 --- a/tests/test_lme4.py +++ b/tests/test_lme4.py @@ -105,6 +105,12 @@ def test_fail_get_non_existent_data(): rlme4.get_feature_data(group="control", repetition=3) +@pytest.mark.xfail(IS_ON_GITHUB_WINDOWS, + reason="https://github.com/astamm/nloptr/issues/115") +def test_get_r_version(): + assert rsetup.get_r_version() + + @pytest.mark.xfail(IS_ON_GITHUB_WINDOWS, reason="https://github.com/astamm/nloptr/issues/115") def test_glmer_basic_larger():