links-notation 0.25.1__tar.gz → 0.25.2__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.
Files changed (45) hide show
  1. {links_notation-0.25.1/links_notation.egg-info → links_notation-0.25.2}/PKG-INFO +3 -3
  2. {links_notation-0.25.1 → links_notation-0.25.2/links_notation.egg-info}/PKG-INFO +3 -3
  3. {links_notation-0.25.1 → links_notation-0.25.2}/links_notation.egg-info/SOURCES.txt +1 -0
  4. {links_notation-0.25.1 → links_notation-0.25.2}/links_notation.egg-info/requires.txt +2 -2
  5. {links_notation-0.25.1 → links_notation-0.25.2}/pyproject.toml +3 -3
  6. links_notation-0.25.2/tests/test_shared_text_parity.py +26 -0
  7. {links_notation-0.25.1 → links_notation-0.25.2}/LICENSE +0 -0
  8. {links_notation-0.25.1 → links_notation-0.25.2}/MANIFEST.in +0 -0
  9. {links_notation-0.25.1 → links_notation-0.25.2}/README.md +0 -0
  10. {links_notation-0.25.1 → links_notation-0.25.2}/README.ru.md +0 -0
  11. {links_notation-0.25.1 → links_notation-0.25.2}/links_notation/__init__.py +0 -0
  12. {links_notation-0.25.1 → links_notation-0.25.2}/links_notation/binary.py +0 -0
  13. {links_notation-0.25.1 → links_notation-0.25.2}/links_notation/comments.py +0 -0
  14. {links_notation-0.25.1 → links_notation-0.25.2}/links_notation/format_config.py +0 -0
  15. {links_notation-0.25.1 → links_notation-0.25.2}/links_notation/formatter.py +0 -0
  16. {links_notation-0.25.1 → links_notation-0.25.2}/links_notation/link.py +0 -0
  17. {links_notation-0.25.1 → links_notation-0.25.2}/links_notation/parser.py +0 -0
  18. {links_notation-0.25.1 → links_notation-0.25.2}/links_notation/quotes.py +0 -0
  19. {links_notation-0.25.1 → links_notation-0.25.2}/links_notation/reference_literal.py +0 -0
  20. {links_notation-0.25.1 → links_notation-0.25.2}/links_notation/stream_parser.py +0 -0
  21. {links_notation-0.25.1 → links_notation-0.25.2}/links_notation.egg-info/dependency_links.txt +0 -0
  22. {links_notation-0.25.1 → links_notation-0.25.2}/links_notation.egg-info/top_level.txt +0 -0
  23. {links_notation-0.25.1 → links_notation-0.25.2}/setup.cfg +0 -0
  24. {links_notation-0.25.1 → links_notation-0.25.2}/tests/test_api.py +0 -0
  25. {links_notation-0.25.1 → links_notation-0.25.2}/tests/test_binary.py +0 -0
  26. {links_notation-0.25.1 → links_notation-0.25.2}/tests/test_comments.py +0 -0
  27. {links_notation-0.25.1 → links_notation-0.25.2}/tests/test_edge_case_parser.py +0 -0
  28. {links_notation-0.25.1 → links_notation-0.25.2}/tests/test_empty_reference.py +0 -0
  29. {links_notation-0.25.1 → links_notation-0.25.2}/tests/test_format_config.py +0 -0
  30. {links_notation-0.25.1 → links_notation-0.25.2}/tests/test_indentation_consistency.py +0 -0
  31. {links_notation-0.25.1 → links_notation-0.25.2}/tests/test_indented_id_nested_values.py +0 -0
  32. {links_notation-0.25.1 → links_notation-0.25.2}/tests/test_indented_id_syntax.py +0 -0
  33. {links_notation-0.25.1 → links_notation-0.25.2}/tests/test_link.py +0 -0
  34. {links_notation-0.25.1 → links_notation-0.25.2}/tests/test_links_group.py +0 -0
  35. {links_notation-0.25.1 → links_notation-0.25.2}/tests/test_mixed_indentation_modes.py +0 -0
  36. {links_notation-0.25.1 → links_notation-0.25.2}/tests/test_multi_quote_parser.py +0 -0
  37. {links_notation-0.25.1 → links_notation-0.25.2}/tests/test_multiline_parser.py +0 -0
  38. {links_notation-0.25.1 → links_notation-0.25.2}/tests/test_multiline_quoted_string.py +0 -0
  39. {links_notation-0.25.1 → links_notation-0.25.2}/tests/test_nested_indentation.py +0 -0
  40. {links_notation-0.25.1 → links_notation-0.25.2}/tests/test_nested_parser.py +0 -0
  41. {links_notation-0.25.1 → links_notation-0.25.2}/tests/test_nested_self_reference.py +0 -0
  42. {links_notation-0.25.1 → links_notation-0.25.2}/tests/test_nesting_limit.py +0 -0
  43. {links_notation-0.25.1 → links_notation-0.25.2}/tests/test_reference_fidelity.py +0 -0
  44. {links_notation-0.25.1 → links_notation-0.25.2}/tests/test_single_line_parser.py +0 -0
  45. {links_notation-0.25.1 → links_notation-0.25.2}/tests/test_stream_parser.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: links-notation
3
- Version: 0.25.1
3
+ Version: 0.25.2
4
4
  Summary: Python implementation of the Links Notation parser
5
5
  Author-email: "Link.Foundation" <drakonard@gmail.com>
6
6
  License-Expression: Unlicense
@@ -25,13 +25,13 @@ Provides-Extra: test
25
25
  Requires-Dist: pytest>=9.1.1; extra == "test"
26
26
  Requires-Dist: pytest-timeout>=2.4.0; extra == "test"
27
27
  Provides-Extra: lint
28
- Requires-Dist: black>=26.10.0; extra == "lint"
28
+ Requires-Dist: black>=26.10.1; extra == "lint"
29
29
  Requires-Dist: isort>=9.0.2; extra == "lint"
30
30
  Requires-Dist: flake8>=7.4.1; extra == "lint"
31
31
  Provides-Extra: dev
32
32
  Requires-Dist: pytest>=9.1.1; extra == "dev"
33
33
  Requires-Dist: pytest-timeout>=2.4.0; extra == "dev"
34
- Requires-Dist: black>=26.10.0; extra == "dev"
34
+ Requires-Dist: black>=26.10.1; extra == "dev"
35
35
  Requires-Dist: isort>=9.0.2; extra == "dev"
36
36
  Requires-Dist: flake8>=7.4.1; extra == "dev"
37
37
  Dynamic: license-file
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: links-notation
3
- Version: 0.25.1
3
+ Version: 0.25.2
4
4
  Summary: Python implementation of the Links Notation parser
5
5
  Author-email: "Link.Foundation" <drakonard@gmail.com>
6
6
  License-Expression: Unlicense
@@ -25,13 +25,13 @@ Provides-Extra: test
25
25
  Requires-Dist: pytest>=9.1.1; extra == "test"
26
26
  Requires-Dist: pytest-timeout>=2.4.0; extra == "test"
27
27
  Provides-Extra: lint
28
- Requires-Dist: black>=26.10.0; extra == "lint"
28
+ Requires-Dist: black>=26.10.1; extra == "lint"
29
29
  Requires-Dist: isort>=9.0.2; extra == "lint"
30
30
  Requires-Dist: flake8>=7.4.1; extra == "lint"
31
31
  Provides-Extra: dev
32
32
  Requires-Dist: pytest>=9.1.1; extra == "dev"
33
33
  Requires-Dist: pytest-timeout>=2.4.0; extra == "dev"
34
- Requires-Dist: black>=26.10.0; extra == "dev"
34
+ Requires-Dist: black>=26.10.1; extra == "dev"
35
35
  Requires-Dist: isort>=9.0.2; extra == "dev"
36
36
  Requires-Dist: flake8>=7.4.1; extra == "dev"
37
37
  Dynamic: license-file
@@ -39,5 +39,6 @@ tests/test_nested_parser.py
39
39
  tests/test_nested_self_reference.py
40
40
  tests/test_nesting_limit.py
41
41
  tests/test_reference_fidelity.py
42
+ tests/test_shared_text_parity.py
42
43
  tests/test_single_line_parser.py
43
44
  tests/test_stream_parser.py
@@ -2,12 +2,12 @@
2
2
  [dev]
3
3
  pytest>=9.1.1
4
4
  pytest-timeout>=2.4.0
5
- black>=26.10.0
5
+ black>=26.10.1
6
6
  isort>=9.0.2
7
7
  flake8>=7.4.1
8
8
 
9
9
  [lint]
10
- black>=26.10.0
10
+ black>=26.10.1
11
11
  isort>=9.0.2
12
12
  flake8>=7.4.1
13
13
 
@@ -7,7 +7,7 @@ build-backend = "setuptools.build_meta"
7
7
 
8
8
  [project]
9
9
  name = "links-notation"
10
- version = "0.25.1"
10
+ version = "0.25.2"
11
11
  description = "Python implementation of the Links Notation parser"
12
12
  readme = "README.md"
13
13
  license = "Unlicense"
@@ -33,8 +33,8 @@ dependencies = []
33
33
 
34
34
  [project.optional-dependencies]
35
35
  test = ["pytest>=9.1.1", "pytest-timeout>=2.4.0"]
36
- lint = ["black>=26.10.0", "isort>=9.0.2", "flake8>=7.4.1"]
37
- dev = ["pytest>=9.1.1", "pytest-timeout>=2.4.0", "black>=26.10.0", "isort>=9.0.2", "flake8>=7.4.1"]
36
+ lint = ["black>=26.10.1", "isort>=9.0.2", "flake8>=7.4.1"]
37
+ dev = ["pytest>=9.1.1", "pytest-timeout>=2.4.0", "black>=26.10.1", "isort>=9.0.2", "flake8>=7.4.1"]
38
38
 
39
39
  [project.urls]
40
40
  Homepage = "https://github.com/link-foundation/links-notation"
@@ -0,0 +1,26 @@
1
+ """All bindings consume the same reviewed parser and formatter golden cases."""
2
+
3
+ import json
4
+ from pathlib import Path
5
+
6
+ import pytest
7
+
8
+ from links_notation import Parser, StreamParser, format_links
9
+
10
+ FIXTURES = json.loads((Path(__file__).resolve().parents[2] / "parity/text-fixtures.json").read_text(encoding="utf-8"))
11
+
12
+
13
+ def tree(links):
14
+ return [{"id": link.id, "values": tree(link.values)} for link in links]
15
+
16
+
17
+ @pytest.mark.parametrize("fixture", FIXTURES, ids=lambda fixture: fixture["id"])
18
+ def test_shared_text_parity(fixture):
19
+ parsed = Parser().parse(fixture["input"])
20
+ assert tree(parsed) == fixture["expected"]
21
+ assert format_links(parsed) == fixture["format"]
22
+ assert tree(Parser().parse(fixture["format"])) == fixture["expected"]
23
+ stream = StreamParser()
24
+ for character in fixture["input"]:
25
+ stream.write(character)
26
+ assert tree(stream.finish()) == fixture["expected"]
File without changes