Skip to content

Commit 6141b85

Browse files
committed
Merge branch 'feature/PI-695-Feature_test_clear_screen' into release/2024-12-05
2 parents 1099bde + bd2780d commit 6141b85

File tree

2 files changed

+22
-14
lines changed

2 files changed

+22
-14
lines changed

pyproject.toml

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ authors = ["NHS England"]
66
license = "LICENSE.md"
77
readme = "README.md"
88
packages = [
9-
{ include = "api", from = "src" },
10-
{ include = "domain", from = "src/layers" },
11-
{ include = "event", from = "src/layers" },
12-
{ include = "api_utils", from = "src/layers" },
13-
{ include = "etl_utils", from = "src/layers" },
14-
{ include = "sds", from = "src/layers" },
15-
{ include = "builder", from = "scripts" },
9+
{ include = "api", from = "src" },
10+
{ include = "domain", from = "src/layers" },
11+
{ include = "event", from = "src/layers" },
12+
{ include = "api_utils", from = "src/layers" },
13+
{ include = "etl_utils", from = "src/layers" },
14+
{ include = "sds", from = "src/layers" },
15+
{ include = "builder", from = "scripts" },
1616
]
1717

1818
[tool.poetry.dependencies]
@@ -46,17 +46,18 @@ pyyaml = "^6.0.1"
4646
proxygen-cli = "^2.1.14"
4747
moto = "^5.0.1"
4848
boto3-stubs = { extras = [
49-
"dynamodb",
50-
"iam",
51-
"lambda",
52-
"s3",
53-
"sqs",
54-
"secretsmanager",
55-
"stepfunctions",
49+
"dynamodb",
50+
"iam",
51+
"lambda",
52+
"s3",
53+
"sqs",
54+
"secretsmanager",
55+
"stepfunctions",
5656
], version = "^1.34.37" }
5757
pytest-timeout = "^2.2.0"
5858
lz4 = "^4.3.3"
5959
pytest-repeat = "^0.9.3"
60+
click = "^8.1.7"
6061

6162
[tool.poetry.group.local]
6263
optional = true

src/api/tests/feature_tests/environment.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
import time
12
from contextlib import nullcontext
23
from pathlib import Path
34

5+
import click
46
from behave import use_fixture
57
from behave.model import Feature, Scenario, Step
68
from event.aws.client import dynamodb_client
@@ -30,6 +32,8 @@
3032

3133

3234
def before_all(context: Context):
35+
clear_screen = context.config.userdata.get("clear_screen", "false")
36+
context.clear_screen = clear_screen.lower() == "true"
3337
context.postman_collection = PostmanCollection()
3438
context.test_mode = TestMode.parse(config=context.config)
3539
context.table_name = LOCAL_TABLE_NAME
@@ -114,6 +118,9 @@ def after_scenario(context: Context, scenario: Scenario):
114118
def after_feature(context: Context, feature: Feature):
115119
if context.postman_feature:
116120
context.postman_collection.item.append(context.postman_feature)
121+
if context.clear_screen:
122+
click.clear()
123+
time.sleep(0.5)
117124

118125

119126
def after_all(context: Context):

0 commit comments

Comments
 (0)