exercism / python

Exercism exercises in Python.
https://exercism.org/tracks/python
MIT License
1.94k stars 1.29k forks source link

Missing backslashes in sgf parsing test test_escaped_t_and_n_in_property_value_are_just_letters_not_whitespace #3282

Closed blakelewis closed 1 year ago

blakelewis commented 1 year ago

The test currently expects you to convert "\t" and "\n" to "t" and "n". The intent is presumably to check that the two-character sequences "\" + "t" and "\" + "n" get converted to "t" and "n", as the problem statement specifies. However, the test string actually contains a tab and a newline because of incorrect escaping.

github-actions[bot] commented 1 year ago

Hello. Thanks for opening an issue on Exercism. We are currently in a phase of our journey where we have paused community contributions to allow us to take a breather and redesign our community model. You can learn more in this blog post. As such, all issues and PRs in this repository are being automatically closed.

That doesn't mean we're not interested in your ideas, or that if you're stuck on something we don't want to help. The best place to discuss things is with our community on the Exercism Community Forum. You can use this link to copy this into a new topic there.


Note: If this issue has been pre-approved, please link back to this issue on the forum thread and a maintainer or staff member will reopen it.

blakelewis commented 1 year ago

OK, that's certainly disappointing. It is too bad that obviously broken changes get checked in.

BethanyG commented 1 year ago

Hi @blakelewis 👋🏽

It seems odd that this solution by one of our top python mentors and contributors passes all the latest tests for this exercise when there is an obviously broken change.

Additionally, if you would like to discuss your issue, you are welcome to in our forum, at which point if it is indeed a bug, we can reopen this issue and assign someone to work on it.

blakelewis commented 1 year ago

The solution that you cite contains a workaround for the test bug at line 48.

It is of course not correct behavior for the parser to convert tab characters to "t" and newlines to "n". It is a very obvious bug. Backslashes are tricky to get right and at some point, a pair of them got dropped.

On Sat, Dec 17, 2022 at 11:59 AM BethanyG @.***> wrote:

Hi @blakelewis https://github.com/blakelewis 👋🏽

It seems odd that this solution https://exercism.org/tracks/python/exercises/sgf-parsing/solutions/IsaacG by one of our top python mentors and contributors passes all the latest tests for this exercise when there is an obviously broken change.

Additionally, if you would like to discuss your issue, you are welcome to in our forum https://forum.exercism.org/new-topic?title=Missing%20backslashes%20in%20sgf%20parsing%20test%20test_escaped_t_and_n_in_property_value_are_just_letters_not_whitespace&body=The%20test%20currently%20expects%20you%20to%20convert%20%22%5Ct%22%20and%20%22%5Cn%22%20to%20%22t%22%20and%20%22n%22.%20%20The%20intent%20is%20presumably%20to%20check%20that%20the%20two-character%20sequences%20%22%5C%22%20+%20%22t%22%20and%20%22%5C%22%20+%20%22n%22%20get%20converted%20to%20%22t%22%20and%20%22n%22,%20as%20the%20problem%20statement%20specifies.%20%20However,%20the%20test%20string%20actually%20contains%20a%20tab%20and%20a%20newline%20because%20of%20incorrect%20escaping.&category=python, at which point if it is indeed a bug, we can reopen this issue and assign someone to work on it.

— Reply to this email directly, view it on GitHub https://github.com/exercism/python/issues/3282#issuecomment-1356445790, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAPOR5YVGIZXJTJ4OL2TI53WNYLTXANCNFSM6AAAAAATCC4XMA . You are receiving this because you were mentioned.Message ID: @.***>