Skip to content

Commit a3b2ac7

Browse files
committed
bug chaotic: incorrect -n "/.*=xxx::{name}" handling
Closes: #1173 commit_hash:86cfde30ef6c80c97550e816d8740ebe5f09d07e
1 parent f3115e3 commit a3b2ac7

2 files changed

Lines changed: 12 additions & 1 deletion

File tree

chaotic/chaotic/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ def traverse_dfs(path: str, data: Any):
160160
except (GeneratorExit, StopIteration):
161161
if feed:
162162
items_to_remove.append(name)
163-
if sticky_feed and item == {}:
163+
elif sticky_feed and item == {}:
164164
items_to_remove.append(name)
165165

166166
for item in items_to_remove:

chaotic/tests/test_main.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,14 @@ def test_extract_schemas_to_scan_configs():
5252
'properties': {'x': {'$ref': '#/definitions/Z'}},
5353
},
5454
}
55+
56+
57+
def test_extract_schemas_to_scan_no_duplicate_deletion():
58+
items = [main.NameMapItem('/.*=SomeType')]
59+
data = {
60+
'schema': {
61+
'field': {'type': 'integer'},
62+
},
63+
}
64+
result = main.extract_schemas_to_scan(data, items)
65+
assert result['/schema/field/'] == {'type': 'integer'}

0 commit comments

Comments
 (0)