Skip to content

Commit 76490dd

Browse files
authored
Fix test__using_default_setup with PYJULIA_TEST_RUNTIME (JuliaPy#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`.
1 parent f3a268c commit 76490dd

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

.github/workflows/testtests.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Test tests
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
tags: '*'
8+
pull_request:
9+
workflow_dispatch:
10+
11+
jobs:
12+
test__using_default_setup:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: Setup python
17+
uses: actions/setup-python@v1
18+
- run: python -m pip install --upgrade tox
19+
- run: python -m tox -- --no-julia -k test__using_default_setup
20+
env:
21+
PYJULIA_TEST_RUNTIME: dummy

src/julia/tests/test_plugin.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@
1010
userhome = os.path.expanduser("~")
1111

1212

13-
def test__using_default_setup(testdir, request):
13+
def test__using_default_setup(testdir, request, monkeypatch):
1414
if request.config.getoption("runpytest") != "subprocess":
1515
raise ValueError("Need `-p pytester --runpytest=subprocess` options.")
16+
monkeypatch.delenv("PYJULIA_TEST_RUNTIME", raising=False)
1617

1718
# create a temporary conftest.py file
1819
testdir.makeini(

0 commit comments

Comments
 (0)