From 8ffd6d76a99261f3c542b4d0105af25ff61a4a53 Mon Sep 17 00:00:00 2001 From: Nicola Soranzo Date: Fri, 28 Feb 2020 01:55:46 +0000 Subject: [PATCH] Fix `test_run_simple()` test broken on Python 2 by virtualenv 20.0.5 xref. https://github.com/pypa/virtualenv/issues/1670 --- .circleci/config.yml | 4 +++- test/unit/jobs/test_expression_run.py | 5 ++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index a87c6269b74..6dd34eb5be2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -95,7 +95,9 @@ jobs: <<: *set_workdir steps: - *restore_repo_cache - - *install_tox + # Temporary virtualenv pin added due to https://github.com/pypa/virtualenv/issues/1670 + #- *install_tox + - run: sudo pip install tox virtualenv==20.0.4 - run: tox -e py27-unit py35_docstring: docker: diff --git a/test/unit/jobs/test_expression_run.py b/test/unit/jobs/test_expression_run.py index c23455d6e07..3a4e0709943 100644 --- a/test/unit/jobs/test_expression_run.py +++ b/test/unit/jobs/test_expression_run.py @@ -32,15 +32,14 @@ def test_run_simple(): if "PYTHONPATH" in new_env: new_env['PYTHONPATH'] = "%s:%s" % (LIB_DIRECTORY, new_env["PYTHONPATH"]) else: - new_env['PYTHONPATH'] = "%s" % (LIB_DIRECTORY) + new_env['PYTHONPATH'] = LIB_DIRECTORY new_env['GALAXY_EXPRESSION_INPUTS'] = environment_path - p = subprocess.Popen( + subprocess.check_call( args=expressions.EXPRESSION_SCRIPT_CALL, shell=True, cwd=test_directory, env=new_env, ) - assert p.wait() == 0 with open(os.path.join(test_directory, 'moo')) as f: out_content = f.read() assert out_content == '7', out_content