Skip to content

Commit f8869f9

Browse files
committed
fix path_deploy() test case
1 parent 35e895a commit f8869f9

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

.drone.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@ steps:
2626
- >
2727
docker run --restart=always --name=pywebio-demos -v $PWD:/app_tmp
2828
--label="traefik.http.services.pywebiodemos.loadbalancer.server.port=80"
29-
-d python:3 bash -c "cp -r /app_tmp /app && cd /app && pip3 install . && pip3 install -r requirements.txt && python3 -m demos --port=80"
29+
-d python:3 bash -c "cp -r /app_tmp /app && cd /app && pip3 install . && pip3 install -r requirements.txt && python3 demos/__main__.py --port=80"
3030
- sleep 5 # wait container start

demos/index.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from demos.config import charts_demo_host
1+
from config import charts_demo_host
22

33
from pywebio.output import put_markdown, put_row, put_html
44
from pywebio.session import info as session_info

test/16.path_deploy.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import os
12
import subprocess
23

34
from percy import percySnapshot
@@ -25,6 +26,7 @@ def test(server_proc: subprocess.Popen, browser: Chrome):
2526

2627

2728
def start_test_server():
29+
os.remove(os.path.join(demos_dir, 'index.py'))
2830
path_deploy(demos_dir, port=8080, host='127.0.0.1', cdn=False)
2931

3032

0 commit comments

Comments
 (0)