Skip to content
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

Fixes #422. Currently this new test_bug_148 will be failed. Think TDD. #423

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Commits on Apr 26, 2023

  1. Fixes test_bug_148. Currently test_bug_148 will fail as Bug 148 was n…

    …ever fixed.
    
    Note, this test is currently supposed to be failed by the current toml, until the next PR I submit, which will create another version that will pass it.  That's the whole point of this PR (put your TDD hat on).
    
    This PR changes the expected outputs on the LHSs to the same outputs from tomli-w and tomlkit.  This test function in its factory form has been tested against tomli-w, tomlkit and against the patched version I will shortly submit in my next PR.  It has also been tested in its inverse form (toml.loads on the LHS instead of toml.dumps on the RHS) against tomli, tomli-w, tomlkit, my patched version (toml_tools), against the Python 3.11 native tomllib, and against this libraries own toml.loads.  All pass.
    
    Also changes normal string literals to raw string literals, to make it easier to count the number of back slashes in the input to actual, and in the expected result .
    
    This test could be more extensive, e.g. to make sure r'\'*n + '\x64' -> r'\\'*n +'d'.  Great!  Lets write more tests!
    
    Just lets do one thing and one thing only here - further tests deserve their own PRs.
    JamesParrott committed Apr 26, 2023
    Configuration menu
    Copy the full SHA
    9d053e6 View commit details
    Browse the repository at this point in the history
  2. Replaces buggy deep magic with a regex. Fixes uiri#148 (5 years too l…

    …ate)
    
    Also adds some sorely needed comments.  Apologies if I got carried away with those, but they're only comments.
    JamesParrott committed Apr 26, 2023
    Configuration menu
    Copy the full SHA
    e3eb77d View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    562a897 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    4af6b9a View commit details
    Browse the repository at this point in the history