def test_all_whitespace(self): # Note: Do not remove the spaces on the blank lines below. They're # test data to show that the lines get removed despite having spaces # on them all_whitespace = u""" \t\t\r\n """ # nopep8 assert amc._strip_comments(all_whitespace) == u""
def test_all_whitespace(self): # Note: Do not remove the spaces on the blank lines below. They're # test data to show that the lines get removed despite having spaces # on them all_whitespace = u""" \t\t\r\n """ # nopep8 assert amc._strip_comments(all_whitespace) == u""
def test_somewhat_normal(self): mixed = u"""#!/usr/bin/python # here we go def test(arg): # this is a thing thing = '# test' return thing # End """ mixed_results = u"""def test(arg): thing = '# test' return thing""" assert amc._strip_comments(mixed) == mixed_results
def test_somewhat_normal(self): mixed = u"""#!/usr/bin/python # here we go def test(arg): # this is a thing thing = '# test' return thing # End """ mixed_results = u"""def test(arg): thing = '# test' return thing""" assert amc._strip_comments(mixed) == mixed_results
def test_all_comments(self): all_comments = u"""# This is a test # Being as it is # To be """ assert amc._strip_comments(all_comments) == u""
def test_no_changes(self): no_comments = u"""def some_code(): return False""" assert amc._strip_comments(no_comments) == no_comments
def test_all_comments(self): all_comments = u"""# This is a test # Being as it is # To be """ assert amc._strip_comments(all_comments) == u""
def test_no_changes(self): no_comments = u"""def some_code(): return False""" assert amc._strip_comments(no_comments) == no_comments