local-web-services-python-sdk 0.1.3__tar.gz → 0.1.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {local_web_services_python_sdk-0.1.3 → local_web_services_python_sdk-0.1.4}/PKG-INFO +1 -1
- {local_web_services_python_sdk-0.1.3 → local_web_services_python_sdk-0.1.4}/pyproject.toml +1 -1
- {local_web_services_python_sdk-0.1.3 → local_web_services_python_sdk-0.1.4}/src/lws_testing/_discovery/hcl.py +35 -20
- {local_web_services_python_sdk-0.1.3 → local_web_services_python_sdk-0.1.4}/.github/workflows/ci.yml +0 -0
- {local_web_services_python_sdk-0.1.3 → local_web_services_python_sdk-0.1.4}/.github/workflows/publish.yml +0 -0
- {local_web_services_python_sdk-0.1.3 → local_web_services_python_sdk-0.1.4}/.gitignore +0 -0
- {local_web_services_python_sdk-0.1.3 → local_web_services_python_sdk-0.1.4}/Makefile +0 -0
- {local_web_services_python_sdk-0.1.3 → local_web_services_python_sdk-0.1.4}/README.md +0 -0
- {local_web_services_python_sdk-0.1.3 → local_web_services_python_sdk-0.1.4}/src/lws_testing/__init__.py +0 -0
- {local_web_services_python_sdk-0.1.3 → local_web_services_python_sdk-0.1.4}/src/lws_testing/_builders/__init__.py +0 -0
- {local_web_services_python_sdk-0.1.3 → local_web_services_python_sdk-0.1.4}/src/lws_testing/_builders/chaos.py +0 -0
- {local_web_services_python_sdk-0.1.3 → local_web_services_python_sdk-0.1.4}/src/lws_testing/_builders/iam.py +0 -0
- {local_web_services_python_sdk-0.1.3 → local_web_services_python_sdk-0.1.4}/src/lws_testing/_builders/mock.py +0 -0
- {local_web_services_python_sdk-0.1.3 → local_web_services_python_sdk-0.1.4}/src/lws_testing/_discovery/__init__.py +0 -0
- {local_web_services_python_sdk-0.1.3 → local_web_services_python_sdk-0.1.4}/src/lws_testing/_discovery/cdk.py +0 -0
- {local_web_services_python_sdk-0.1.3 → local_web_services_python_sdk-0.1.4}/src/lws_testing/_logs.py +0 -0
- {local_web_services_python_sdk-0.1.3 → local_web_services_python_sdk-0.1.4}/src/lws_testing/_resources/__init__.py +0 -0
- {local_web_services_python_sdk-0.1.3 → local_web_services_python_sdk-0.1.4}/src/lws_testing/_resources/dynamodb.py +0 -0
- {local_web_services_python_sdk-0.1.3 → local_web_services_python_sdk-0.1.4}/src/lws_testing/_resources/s3.py +0 -0
- {local_web_services_python_sdk-0.1.3 → local_web_services_python_sdk-0.1.4}/src/lws_testing/_resources/sqs.py +0 -0
- {local_web_services_python_sdk-0.1.3 → local_web_services_python_sdk-0.1.4}/src/lws_testing/_transport/__init__.py +0 -0
- {local_web_services_python_sdk-0.1.3 → local_web_services_python_sdk-0.1.4}/src/lws_testing/_transport/inprocess.py +0 -0
- {local_web_services_python_sdk-0.1.3 → local_web_services_python_sdk-0.1.4}/src/lws_testing/fixtures.py +0 -0
- {local_web_services_python_sdk-0.1.3 → local_web_services_python_sdk-0.1.4}/src/lws_testing/session.py +0 -0
- {local_web_services_python_sdk-0.1.3 → local_web_services_python_sdk-0.1.4}/tests/__init__.py +0 -0
- {local_web_services_python_sdk-0.1.3 → local_web_services_python_sdk-0.1.4}/tests/unit/__init__.py +0 -0
- {local_web_services_python_sdk-0.1.3 → local_web_services_python_sdk-0.1.4}/tests/unit/test_session_imports.py +0 -0
- {local_web_services_python_sdk-0.1.3 → local_web_services_python_sdk-0.1.4}/tests/unit/test_session_lifecycle.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: local-web-services-python-sdk
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.4
|
|
4
4
|
Summary: Python testing SDK for local-web-services — in-process pytest fixtures and boto3 helpers
|
|
5
5
|
Project-URL: Homepage, https://local-web-services.github.io/www
|
|
6
6
|
Project-URL: Repository, https://github.com/local-web-services/local-web-services-sdk-python
|
|
@@ -105,6 +105,32 @@ def _parse_tf_file(path: Path) -> list[tuple[str, str, dict[str, str]]]:
|
|
|
105
105
|
return results
|
|
106
106
|
|
|
107
107
|
|
|
108
|
+
def _try_heredoc(lines: list[str], i: int) -> tuple[str, str, int] | None:
|
|
109
|
+
"""If line *i* is a heredoc opener, return *(key, value, next_i)*, else *None*."""
|
|
110
|
+
m = _ATTR_HEREDOC.match(lines[i])
|
|
111
|
+
if not m:
|
|
112
|
+
return None
|
|
113
|
+
key = m.group("key")
|
|
114
|
+
marker = m.group("marker")
|
|
115
|
+
i += 1
|
|
116
|
+
body: list[str] = []
|
|
117
|
+
while i < len(lines) and lines[i].rstrip() != marker:
|
|
118
|
+
body.append(lines[i])
|
|
119
|
+
i += 1
|
|
120
|
+
return key, "\n".join(body), i + 1 # i+1 advances past the closing marker
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
def _extract_attr(line: str) -> tuple[str, str] | None:
|
|
124
|
+
"""Return *(key, value)* if *line* is a simple attribute assignment, else *None*."""
|
|
125
|
+
m = _ATTR_STR.match(line)
|
|
126
|
+
if m:
|
|
127
|
+
return m.group("key"), m.group("value")
|
|
128
|
+
m2 = _ATTR_BARE.match(line)
|
|
129
|
+
if m2:
|
|
130
|
+
return m2.group("key"), m2.group("value")
|
|
131
|
+
return None
|
|
132
|
+
|
|
133
|
+
|
|
108
134
|
def _collect_block(lines: list[str], start: int) -> tuple[dict[str, str], int]:
|
|
109
135
|
"""Collect top-level key=value pairs until the matching closing brace."""
|
|
110
136
|
attrs: dict[str, str] = {}
|
|
@@ -113,20 +139,13 @@ def _collect_block(lines: list[str], start: int) -> tuple[dict[str, str], int]:
|
|
|
113
139
|
while i < len(lines) and depth > 0:
|
|
114
140
|
line = lines[i]
|
|
115
141
|
|
|
116
|
-
#
|
|
117
|
-
#
|
|
142
|
+
# Check for heredoc before adjusting depth so JSON braces inside
|
|
143
|
+
# the heredoc body do not corrupt the brace counter.
|
|
118
144
|
if depth == 1:
|
|
119
|
-
|
|
120
|
-
if
|
|
121
|
-
key =
|
|
122
|
-
|
|
123
|
-
i += 1
|
|
124
|
-
heredoc_lines: list[str] = []
|
|
125
|
-
while i < len(lines) and lines[i].rstrip() != marker:
|
|
126
|
-
heredoc_lines.append(lines[i])
|
|
127
|
-
i += 1
|
|
128
|
-
attrs[key] = "\n".join(heredoc_lines)
|
|
129
|
-
i += 1 # skip the closing marker line
|
|
145
|
+
result = _try_heredoc(lines, i)
|
|
146
|
+
if result is not None:
|
|
147
|
+
key, value, i = result
|
|
148
|
+
attrs[key] = value
|
|
130
149
|
continue
|
|
131
150
|
|
|
132
151
|
depth += line.count("{") - line.count("}")
|
|
@@ -135,13 +154,9 @@ def _collect_block(lines: list[str], start: int) -> tuple[dict[str, str], int]:
|
|
|
135
154
|
continue
|
|
136
155
|
if depth == 0:
|
|
137
156
|
break
|
|
138
|
-
|
|
139
|
-
if
|
|
140
|
-
attrs[
|
|
141
|
-
else:
|
|
142
|
-
m2 = _ATTR_BARE.match(line)
|
|
143
|
-
if m2:
|
|
144
|
-
attrs[m2.group("key")] = m2.group("value")
|
|
157
|
+
pair = _extract_attr(line)
|
|
158
|
+
if pair is not None:
|
|
159
|
+
attrs[pair[0]] = pair[1]
|
|
145
160
|
i += 1
|
|
146
161
|
return attrs, i + 1
|
|
147
162
|
|
{local_web_services_python_sdk-0.1.3 → local_web_services_python_sdk-0.1.4}/.github/workflows/ci.yml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{local_web_services_python_sdk-0.1.3 → local_web_services_python_sdk-0.1.4}/src/lws_testing/_logs.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{local_web_services_python_sdk-0.1.3 → local_web_services_python_sdk-0.1.4}/tests/__init__.py
RENAMED
|
File without changes
|
{local_web_services_python_sdk-0.1.3 → local_web_services_python_sdk-0.1.4}/tests/unit/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|