Skip to content

Commit 334351c

Browse files
committed
Combine four Python tests into one
To reduce the test time
1 parent 07846c3 commit 334351c

File tree

12 files changed

+245
-287
lines changed

12 files changed

+245
-287
lines changed

src/workerd/server/tests/python/BUILD.bazel

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,13 @@ load("//src/workerd/server/tests/python:py_wd_test.bzl", "py_wd_test", "python_t
33

44
python_test_setup()
55

6+
# Each test takes a while to start up, so if possible add additional tests to many-tests or sdk or
7+
# some other existing test.
68
py_wd_test("hello")
79

8-
py_wd_test("env-param")
10+
py_wd_test("many-tests")
911

10-
py_wd_test(
11-
"top-level-env",
12-
skip_python_flags = ["0.26.0a2"],
13-
)
12+
py_wd_test("env-param")
1413

1514
py_wd_test("asgi")
1615

@@ -22,8 +21,6 @@ py_wd_test("subdirectory")
2221

2322
py_wd_test("sdk")
2423

25-
py_wd_test("seek-metadatafs")
26-
2724
gen_rust_import_tests()
2825

2926
py_wd_test("undefined-handler")
@@ -50,18 +47,12 @@ py_wd_test(
5047
skip_python_flags = ["0.26.0a2"],
5148
)
5249

53-
py_wd_test("js-import")
54-
55-
py_wd_test("importable-env")
56-
5750
py_wd_test("python-rpc")
5851

5952
py_wd_test("workflow-entrypoint")
6053

6154
py_wd_test("vendor_dir_compat_flag")
6255

63-
py_wd_test("multiprocessing")
64-
6556
py_wd_test("default-class-with-legacy-global-handlers")
6657

6758
py_wd_test(

src/workerd/server/tests/python/importable-env/worker.py

Lines changed: 0 additions & 112 deletions
This file was deleted.

src/workerd/server/tests/python/js-import/js-import.wd-test

Lines changed: 0 additions & 18 deletions
This file was deleted.

src/workerd/server/tests/python/js-import/worker.py

Lines changed: 0 additions & 23 deletions
This file was deleted.

src/workerd/server/tests/python/importable-env/importable-env.wd-test renamed to src/workerd/server/tests/python/many-tests/env.wd-test

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,23 @@ using Workerd = import "/workerd/workerd.capnp";
22

33
const unitTests :Workerd.Config = (
44
services = [
5-
( name = "importable-env-test",
5+
( name = "python-hello",
66
worker = (
77
modules = [
8-
(name = "worker.py", pythonModule = embed "worker.py"),
8+
(name = "worker.py", pythonModule = embed "worker.py")
99
],
1010
compatibilityFlags = [
1111
%PYTHON_FEATURE_FLAGS,
12-
"disable_python_no_global_handlers",
12+
"python_no_global_handlers",
1313
"unwrap_custom_thenables"
1414
],
1515
bindings = [
16+
(
17+
name = "secret",
18+
text = "thisisasecret"
19+
),
1620
(name = "FOO", text = "BAR"),
21+
(name = "TEST_VALUE", text = "TEST_STRING"),
1722
(name = "CACHE", memoryCache = (
1823
id = "abc123",
1924
limits = (

0 commit comments

Comments
 (0)