JosephTLyons / JosephTLyons/lenient_parse

Weird strings that give errors when parsing with lenient_parse.to_float

Open
#86 5 comments 1 reaction 0 assignees View on GitHub
bug
Dominant language
Gleam
Stars
21
Forks
2
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.