MCPcopy Create free account
hub / github.com/ipython/ipython / test_has_comment

Function test_has_comment

IPython/core/tests/test_inputtransformer.py:444–454  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

442 transform_checker(line_example, ipt.cellmagic, end_on_blank_line=True)
443
444def test_has_comment():
445 tests = [('text', False),
446 ('text #comment', True),
447 ('text #comment\n', True),
448 ('#comment', True),
449 ('#comment\n', True),
450 ('a = "#string"', False),
451 ('a = "#string" # comment', True),
452 ('a #comment not "string"', True),
453 ]
454 tt.check_pairs(ipt.has_comment, tests)
455
456@ipt.TokenInputTransformer.wrap
457def decistmt(tokens):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected