Skip to content

Commit 0acffad

Browse files
committed
Remove auto services from test command
1 parent 4f72a40 commit 0acffad

File tree

1 file changed

+8
-15
lines changed

1 file changed

+8
-15
lines changed

bolt-pytest/bolt/pytest/cli.py

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import contextlib
21
import os
32
import subprocess
43
import sys
@@ -39,21 +38,15 @@ def cli(pytest_args):
3938

4039
click.secho(f"Running pytest with APP_ENV={os.environ['APP_ENV']}", bold=True)
4140

42-
# Won't want to start services automatically in some cases...
43-
# may need a better check for this but CI is the primary auto-exclusion
44-
services = (
45-
Services() if "CI" not in os.environ and Services else contextlib.nullcontext()
41+
result = subprocess.run(
42+
[
43+
"pytest",
44+
*pytest_args,
45+
],
46+
env={
47+
**os.environ,
48+
},
4649
)
47-
with services:
48-
result = subprocess.run(
49-
[
50-
"pytest",
51-
*pytest_args,
52-
],
53-
env={
54-
**os.environ,
55-
},
56-
)
5750

5851
if result.returncode:
5952
# Can be invoked by pre-commit, so only exit if it fails

0 commit comments

Comments
 (0)