From 76490dda75e836de314e1111985c6d1dcbf53480 Mon Sep 17 00:00:00 2001 From: Takafumi Arakaki Date: Sun, 13 Sep 2020 18:18:20 -0700 Subject: [PATCH] Fix test__using_default_setup with PYJULIA_TEST_RUNTIME (#420) Before this patch, PYJULIA_TEST_RUNTIME=dummy tox -- --no-julia -k test__using_default_setup did not work (which came up when I was writing https://github.com/tkf/PyJuliaTester.jl). It is fixed by removing `PYJULIA_TEST_RUNTIME` in `test__using_default_setup`. --- .github/workflows/testtests.yml | 21 +++++++++++++++++++++ src/julia/tests/test_plugin.py | 3 ++- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/testtests.yml diff --git a/.github/workflows/testtests.yml b/.github/workflows/testtests.yml new file mode 100644 index 00000000..be40ebec --- /dev/null +++ b/.github/workflows/testtests.yml @@ -0,0 +1,21 @@ +name: Test tests + +on: + push: + branches: + - master + tags: '*' + pull_request: + workflow_dispatch: + +jobs: + test__using_default_setup: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Setup python + uses: actions/setup-python@v1 + - run: python -m pip install --upgrade tox + - run: python -m tox -- --no-julia -k test__using_default_setup + env: + PYJULIA_TEST_RUNTIME: dummy diff --git a/src/julia/tests/test_plugin.py b/src/julia/tests/test_plugin.py index 8e62ad47..aebb8f3f 100644 --- a/src/julia/tests/test_plugin.py +++ b/src/julia/tests/test_plugin.py @@ -10,9 +10,10 @@ userhome = os.path.expanduser("~") -def test__using_default_setup(testdir, request): +def test__using_default_setup(testdir, request, monkeypatch): if request.config.getoption("runpytest") != "subprocess": raise ValueError("Need `-p pytester --runpytest=subprocess` options.") + monkeypatch.delenv("PYJULIA_TEST_RUNTIME", raising=False) # create a temporary conftest.py file testdir.makeini(