syncraft 0.1.17__tar.gz → 0.1.18__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.
Potentially problematic release.
This version of syncraft might be problematic. Click here for more details.
- {syncraft-0.1.17 → syncraft-0.1.18}/PKG-INFO +1 -1
- {syncraft-0.1.17 → syncraft-0.1.18}/pyproject.toml +1 -1
- {syncraft-0.1.17 → syncraft-0.1.18}/syncraft.egg-info/PKG-INFO +1 -1
- {syncraft-0.1.17 → syncraft-0.1.18}/tests/test_bimap.py +12 -0
- {syncraft-0.1.17 → syncraft-0.1.18}/LICENSE +0 -0
- {syncraft-0.1.17 → syncraft-0.1.18}/README.md +0 -0
- {syncraft-0.1.17 → syncraft-0.1.18}/setup.cfg +0 -0
- {syncraft-0.1.17 → syncraft-0.1.18}/syncraft/__init__.py +0 -0
- {syncraft-0.1.17 → syncraft-0.1.18}/syncraft/algebra.py +0 -0
- {syncraft-0.1.17 → syncraft-0.1.18}/syncraft/ast.py +0 -0
- {syncraft-0.1.17 → syncraft-0.1.18}/syncraft/cmd.py +0 -0
- {syncraft-0.1.17 → syncraft-0.1.18}/syncraft/diagnostic.py +0 -0
- {syncraft-0.1.17 → syncraft-0.1.18}/syncraft/dsl.py +0 -0
- {syncraft-0.1.17 → syncraft-0.1.18}/syncraft/generator.py +0 -0
- {syncraft-0.1.17 → syncraft-0.1.18}/syncraft/parser.py +0 -0
- {syncraft-0.1.17 → syncraft-0.1.18}/syncraft/py.typed +0 -0
- {syncraft-0.1.17 → syncraft-0.1.18}/syncraft/sqlite3.py +0 -0
- {syncraft-0.1.17 → syncraft-0.1.18}/syncraft.egg-info/SOURCES.txt +0 -0
- {syncraft-0.1.17 → syncraft-0.1.18}/syncraft.egg-info/dependency_links.txt +0 -0
- {syncraft-0.1.17 → syncraft-0.1.18}/syncraft.egg-info/requires.txt +0 -0
- {syncraft-0.1.17 → syncraft-0.1.18}/syncraft.egg-info/top_level.txt +0 -0
- {syncraft-0.1.17 → syncraft-0.1.18}/tests/test_parse.py +0 -0
- {syncraft-0.1.17 → syncraft-0.1.18}/tests/test_until.py +0 -0
|
@@ -259,3 +259,15 @@ def test_combo() -> None:
|
|
|
259
259
|
ast = parse(syntax(Parser), sql, dialect="sqlite")
|
|
260
260
|
assert isinstance(ast, Error)
|
|
261
261
|
|
|
262
|
+
|
|
263
|
+
def test_optional():
|
|
264
|
+
A = literal("a").bind("a")
|
|
265
|
+
syntax = A.optional()
|
|
266
|
+
ast1 = parse(syntax(Parser), "", dialect="sqlite")
|
|
267
|
+
v1, _ = ast1.bimap(None)
|
|
268
|
+
assert v1 is None
|
|
269
|
+
ast2 = parse(syntax(Parser), "a", dialect="sqlite")
|
|
270
|
+
v2, _ = ast2.bimap(None)
|
|
271
|
+
assert v2 == NamedResult(name='a', value=TokenGen.from_string('a'))
|
|
272
|
+
|
|
273
|
+
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|