File tree Expand file tree Collapse file tree
tests/bot/exts/info/codeblock Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66class FindFaultyCodeblocksTest (unittest .TestCase ):
77 def test_should_recognize_missing_language (self ):
88 message = """```
9- x = 4
10- y = 2
11- print("abc")
12- ```"""
9+ x = 4
10+ y = 2
11+ print("abc")
12+ ```"""
1313 faulty_code_blocks = parsing .find_faulty_code_blocks (message )
1414 self .assertIsNotNone (faulty_code_blocks )
1515 self .assertEqual (len (faulty_code_blocks ), 1 )
1616
1717 def test_should_recognize_contained_codeblock (self ):
1818 message = """'
19- wouldn't it be easier to do:
20- ```py
21- say_hi = lambda:
22- print('hello')
23- print('world')
24- say_hi()
19+ wouldn't it be easier to do:
20+ ```py
21+ say_hi = lambda:
22+ print('hello')
23+ print('world')
24+ say_hi()
2525
26- '
27- ```
26+ '
27+ ```
2828
29- '"""
29+ '"""
3030 faulty_code_blocks = parsing .find_faulty_code_blocks (message )
3131 self .assertIsNone (faulty_code_blocks )
3232
You can’t perform that action at this time.
0 commit comments