Skip to content

Commit

Permalink
Fix test__using_default_setup with PYJULIA_TEST_RUNTIME (#420)
Browse files Browse the repository at this point in the history
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`.
  • Loading branch information
tkf authored Sep 14, 2020
1 parent f3a268c commit 76490dd
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
21 changes: 21 additions & 0 deletions .github/workflows/testtests.yml
Original file line number Diff line number Diff line change
@@ -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
3 changes: 2 additions & 1 deletion src/julia/tests/test_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 76490dd

Please sign in to comment.