local-web-services-python-sdk 0.1.2__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.2 → local_web_services_python_sdk-0.1.4}/PKG-INFO +1 -1
- {local_web_services_python_sdk-0.1.2 → local_web_services_python_sdk-0.1.4}/pyproject.toml +1 -1
- {local_web_services_python_sdk-0.1.2 → local_web_services_python_sdk-0.1.4}/src/lws_testing/_discovery/hcl.py +41 -7
- {local_web_services_python_sdk-0.1.2 → local_web_services_python_sdk-0.1.4}/.github/workflows/ci.yml +0 -0
- {local_web_services_python_sdk-0.1.2 → local_web_services_python_sdk-0.1.4}/.github/workflows/publish.yml +0 -0
- {local_web_services_python_sdk-0.1.2 → local_web_services_python_sdk-0.1.4}/.gitignore +0 -0
- {local_web_services_python_sdk-0.1.2 → local_web_services_python_sdk-0.1.4}/Makefile +0 -0
- {local_web_services_python_sdk-0.1.2 → local_web_services_python_sdk-0.1.4}/README.md +0 -0
- {local_web_services_python_sdk-0.1.2 → local_web_services_python_sdk-0.1.4}/src/lws_testing/__init__.py +0 -0
- {local_web_services_python_sdk-0.1.2 → local_web_services_python_sdk-0.1.4}/src/lws_testing/_builders/__init__.py +0 -0
- {local_web_services_python_sdk-0.1.2 → local_web_services_python_sdk-0.1.4}/src/lws_testing/_builders/chaos.py +0 -0
- {local_web_services_python_sdk-0.1.2 → local_web_services_python_sdk-0.1.4}/src/lws_testing/_builders/iam.py +0 -0
- {local_web_services_python_sdk-0.1.2 → local_web_services_python_sdk-0.1.4}/src/lws_testing/_builders/mock.py +0 -0
- {local_web_services_python_sdk-0.1.2 → local_web_services_python_sdk-0.1.4}/src/lws_testing/_discovery/__init__.py +0 -0
- {local_web_services_python_sdk-0.1.2 → local_web_services_python_sdk-0.1.4}/src/lws_testing/_discovery/cdk.py +0 -0
- {local_web_services_python_sdk-0.1.2 → local_web_services_python_sdk-0.1.4}/src/lws_testing/_logs.py +0 -0
- {local_web_services_python_sdk-0.1.2 → local_web_services_python_sdk-0.1.4}/src/lws_testing/_resources/__init__.py +0 -0
- {local_web_services_python_sdk-0.1.2 → local_web_services_python_sdk-0.1.4}/src/lws_testing/_resources/dynamodb.py +0 -0
- {local_web_services_python_sdk-0.1.2 → local_web_services_python_sdk-0.1.4}/src/lws_testing/_resources/s3.py +0 -0
- {local_web_services_python_sdk-0.1.2 → local_web_services_python_sdk-0.1.4}/src/lws_testing/_resources/sqs.py +0 -0
- {local_web_services_python_sdk-0.1.2 → local_web_services_python_sdk-0.1.4}/src/lws_testing/_transport/__init__.py +0 -0
- {local_web_services_python_sdk-0.1.2 → local_web_services_python_sdk-0.1.4}/src/lws_testing/_transport/inprocess.py +0 -0
- {local_web_services_python_sdk-0.1.2 → local_web_services_python_sdk-0.1.4}/src/lws_testing/fixtures.py +0 -0
- {local_web_services_python_sdk-0.1.2 → local_web_services_python_sdk-0.1.4}/src/lws_testing/session.py +0 -0
- {local_web_services_python_sdk-0.1.2 → local_web_services_python_sdk-0.1.4}/tests/__init__.py +0 -0
- {local_web_services_python_sdk-0.1.2 → local_web_services_python_sdk-0.1.4}/tests/unit/__init__.py +0 -0
- {local_web_services_python_sdk-0.1.2 → local_web_services_python_sdk-0.1.4}/tests/unit/test_session_imports.py +0 -0
- {local_web_services_python_sdk-0.1.2 → 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
|
|
@@ -14,6 +14,8 @@ _RESOURCE_HEADER = re.compile(
|
|
|
14
14
|
_ATTR_STR = re.compile(r'^\s*(?P<key>\w+)\s*=\s*"(?P<value>[^"]*)"')
|
|
15
15
|
# Matches a simple key = value (unquoted booleans / numbers)
|
|
16
16
|
_ATTR_BARE = re.compile(r"^\s*(?P<key>\w+)\s*=\s*(?P<value>\S+)")
|
|
17
|
+
# Matches a heredoc opener: key = <<MARKER
|
|
18
|
+
_ATTR_HEREDOC = re.compile(r"^\s*(?P<key>\w+)\s*=\s*<<(?P<marker>\w+)\s*$")
|
|
17
19
|
|
|
18
20
|
# Maps Terraform resource types to (collection_key, builder_function)
|
|
19
21
|
_DISPATCH: dict[str, tuple[str, Any]] = {
|
|
@@ -103,6 +105,32 @@ def _parse_tf_file(path: Path) -> list[tuple[str, str, dict[str, str]]]:
|
|
|
103
105
|
return results
|
|
104
106
|
|
|
105
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
|
+
|
|
106
134
|
def _collect_block(lines: list[str], start: int) -> tuple[dict[str, str], int]:
|
|
107
135
|
"""Collect top-level key=value pairs until the matching closing brace."""
|
|
108
136
|
attrs: dict[str, str] = {}
|
|
@@ -110,19 +138,25 @@ def _collect_block(lines: list[str], start: int) -> tuple[dict[str, str], int]:
|
|
|
110
138
|
i = start
|
|
111
139
|
while i < len(lines) and depth > 0:
|
|
112
140
|
line = lines[i]
|
|
141
|
+
|
|
142
|
+
# Check for heredoc before adjusting depth so JSON braces inside
|
|
143
|
+
# the heredoc body do not corrupt the brace counter.
|
|
144
|
+
if depth == 1:
|
|
145
|
+
result = _try_heredoc(lines, i)
|
|
146
|
+
if result is not None:
|
|
147
|
+
key, value, i = result
|
|
148
|
+
attrs[key] = value
|
|
149
|
+
continue
|
|
150
|
+
|
|
113
151
|
depth += line.count("{") - line.count("}")
|
|
114
152
|
if depth > 1:
|
|
115
153
|
i += 1
|
|
116
154
|
continue
|
|
117
155
|
if depth == 0:
|
|
118
156
|
break
|
|
119
|
-
|
|
120
|
-
if
|
|
121
|
-
attrs[
|
|
122
|
-
else:
|
|
123
|
-
m2 = _ATTR_BARE.match(line)
|
|
124
|
-
if m2:
|
|
125
|
-
attrs[m2.group("key")] = m2.group("value")
|
|
157
|
+
pair = _extract_attr(line)
|
|
158
|
+
if pair is not None:
|
|
159
|
+
attrs[pair[0]] = pair[1]
|
|
126
160
|
i += 1
|
|
127
161
|
return attrs, i + 1
|
|
128
162
|
|
{local_web_services_python_sdk-0.1.2 → 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.2 → 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.2 → local_web_services_python_sdk-0.1.4}/tests/__init__.py
RENAMED
|
File without changes
|
{local_web_services_python_sdk-0.1.2 → local_web_services_python_sdk-0.1.4}/tests/unit/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|