-
-
Notifications
You must be signed in to change notification settings - Fork 47
fix(toml): swap uiri/toml encoder for tomli_w (issue #439 residual) #566
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
fcdd66d
fab8096
a5fe910
7739dea
c2cf3fe
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,17 +1,82 @@ | ||||||
| import unittest | ||||||
|
|
||||||
| # from benedict.serializers import TOMLSerializer | ||||||
| from benedict import benedict | ||||||
| from benedict.dicts.io import IODict | ||||||
| from benedict.serializers import TOMLSerializer | ||||||
|
|
||||||
|
|
||||||
| class toml_serializer_test_case(unittest.TestCase): | ||||||
| """ | ||||||
| This class describes a toml serializer test case. | ||||||
|
|
||||||
| Regression coverage for issue #439 — the uiri/toml encoder crashes | ||||||
| on certain strings. These tests pin the encode path to a library | ||||||
| that handles them correctly and guard against regression. | ||||||
| """ | ||||||
|
|
||||||
| def test_decode_toml(self) -> None: | ||||||
| # TODO | ||||||
| pass | ||||||
| def test_encode_ansi_control_character(self): | ||||||
| """Scenario 1 — falsification clause #1. | ||||||
|
|
||||||
| `benedict({"color": "\033[31m"}).to_toml()` must not raise. On | ||||||
|
||||||
| `benedict({"color": "\033[31m"}).to_toml()` must not raise. On | |
| `benedict({"color": "\\033[31m"}).to_toml()` must not raise. On |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test methods in this file omit the
-> Nonereturn type annotation, while the other serializer test modules consistently include it (e.g.,tests/serializers/test_abstract_serializer.py:12). For consistency (and to keep type-checking expectations uniform), please add-> Noneto these new test methods.