Skip to content

Weird strings that give errors when parsing with lenient_parse.to_float #86

@mooreryan

Description

@mooreryan

Just a couple of the potentially interesting strings that I found with the property tests.

  • this one is interesting:
    • original: "+2_2_6_275_1.\r\n\u{000B}\n\n ", shrunk: "9.\t", error: UnknownCharacter(13, "\r\n")
    • Python gives: 2262751.0 for original and 9.0 for shrunk

These ones probably should be treated as expected for now:

  • numbers that go out of bounds (expected to crash)
    • original: "\r \r\r\t-0_09.0_0_1E+7_7_0_4_6\t\u{000B}", shrunk: ".9E999"
  • non-finite (expected crash really)
    • original: "\u{000B}\f\r\n\t\r\r+iNFiNITy\n\u{000B}\u{000B}\f\r\n\t\r\r", shrunk: "iNFiNITy"
    • (I imagine nan will give the similar)

I will hold off on putting more here for now. The subsequent ones that are unexpected as I find them, I will put into example test cases to anchor the tests.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions