Commit 5d237ac
Escape generated pyproject TOML strings (#3436)
* Escape generated pyproject TOML strings
* Mark TOML escaping test as allow_direct_assert
The assert-helper guard test rejects direct assert statements in guarded
modules. This unit test verifies a TOML round-trip rather than comparing
generated output via shared helpers, so the narrow marker exception fits.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* Test TOML escaping via e2e golden-file comparison
Replace the unit-style direct-assert test with run_main_with_args against
a golden fixture, matching the other generate-pyproject-config tests. This
exercises the full CLI path and drops the need for the allow_direct_assert
marker the assert-helper guard would otherwise require.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent e68db15 commit 5d237ac
3 files changed
Lines changed: 24 additions & 1 deletion
File tree
- src/datamodel_code_generator
- tests
- data/expected/main_kr/generate_pyproject_config
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
629 | 629 | | |
630 | 630 | | |
631 | 631 | | |
632 | | - | |
| 632 | + | |
633 | 633 | | |
634 | 634 | | |
635 | 635 | | |
| |||
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
827 | 827 | | |
828 | 828 | | |
829 | 829 | | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
830 | 848 | | |
831 | 849 | | |
832 | 850 | | |
| |||
0 commit comments