Fix getting of the "bad ticks" instructions for codeblocks - #3549
Fix getting of the "bad ticks" instructions for codeblocks#3549roli2py wants to merge 3 commits into
Conversation
| @unittest.expectedFailure | ||
| def test_should_recognize_contained_codeblock_even_if_that_breaks_formatting(self): |
There was a problem hiding this comment.
What would be the faulty code block here? I think this test shouldn't e an expected failure. Though if this is an edge case that's hard to fix, then I'm fine with letting this be a failure.
There was a problem hiding this comment.
I think it's an edge case, but I don't really know. I tried to figure out how to fix it, but it seems adding a lot of code and, therefore, an overwhelm.
|
|
||
|
|
||
| class ProvideBadTicksInstructionsTest(unittest.TestCase): | ||
| def __assert_is_instructions_for_message_bad_ticks_one(self, message: str) -> None: |
There was a problem hiding this comment.
Use a single underscore as a prefix, not a double underscore.
There was a problem hiding this comment.
Why? This method is test-case-specific and I think we can just leave with double underscore. As I understand, a single underscore is used when we need to use objects internally, for example, within the module and not only in the class.
UPD: rephrased the last sentence
Create the unit tests that check whether the finder recognizes Python strings as codeblocks.
001bdca to
9b4162b
Compare
De-coupling helps to isolate the tests and make the tests more stabler and independent from external objects.
Also, because RE finding isn't overlapping now, the
test_should_recognize_contained_codeblock_even_if_that_breaks_formattingunit test is failing. Not sure it's critical or not, so I marked it as expected to fail.Closes #3547