Skip to content

Commit dc837bd

Browse files
committed
test dash_process_server without PYTHONPATH
1 parent 5b9187e commit dc837bd

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"private::test.py.deploy-standard": "npm run private::test.setup-standard && cd \\@plotly/dash-generator-test-component-standard && pip install -e .",
1717
"private::test.R.deploy-nested": "npm run private::test.setup-nested && cd \\@plotly/dash-generator-test-component-nested && sudo R CMD INSTALL .",
1818
"private::test.R.deploy-standard": "npm run private::test.setup-standard && cd \\@plotly/dash-generator-test-component-standard && sudo R CMD INSTALL .",
19-
"private::test.unit-dash": "PYTHONPATH=tests/assets pytest tests/unit",
19+
"private::test.unit-dash": "pytest tests/unit",
2020
"private::test.unit-renderer": "cd dash-renderer && npm run test",
2121
"private::test.integration-dash": "TESTFILES=$(circleci tests glob \"tests/integration/**/test_*.py\" | circleci tests split --split-by=timings) && pytest --headless --nopercyfinalize --junitxml=test-reports/junit_intg.xml ${TESTFILES}",
2222
"format": "run-s private::format.*",

tests/unit/test_app_runners.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import os
12
import sys
23
import requests
34
import pytest
@@ -25,6 +26,9 @@ def test_threaded_server_smoke(dash_thread_server):
2526
sys.version_info < (3,), reason="requires python3 for process testing"
2627
)
2728
def test_process_server_smoke(dash_process_server):
29+
this_dir = os.path.dirname(__file__)
30+
assets_dir = os.path.abspath(os.path.join(this_dir, "..", "assets"))
31+
os.chdir(assets_dir)
2832
dash_process_server("simple_app")
2933
r = requests.get(dash_process_server.url)
3034
assert r.status_code == 200, "the server is reachable"

0 commit comments

Comments
 (0)