def test_no_print_statements(self): self.assertEqual(0, len(list(checks.check_no_print_statements( "a line with no print statement", "cinder/file.py", False)))) self.assertEqual(1, len(list(checks.check_no_print_statements( "print('My print statement')", "cinder/file.py", False)))) self.assertEqual(0, len(list(checks.check_no_print_statements( "print('My print statement in cinder/cmd, which is ok.')", "cinder/cmd/file.py", False)))) self.assertEqual(0, len(list(checks.check_no_print_statements( "print('My print statement that I just must have.')", "cinder.tests.unit/file.py", True)))) self.assertEqual(1, len(list(checks.check_no_print_statements( "print ('My print with space')", "cinder/volume/anotherFile.py", False))))