Exemple #1
0
def test_MinimumLineCount3_simple_program():
    """Test that MinimumLineCount3 accepts a program with 3 lines."""
    assert common.MinimumLineCount3("""
int main(int argc, char** argv) {
  return 0;
}  
""") == """
Exemple #2
0
def test_MinimumLineCount3_whitespace_does_not_count():
    """Test that MinimumLineCount3 rejects ignores whitespace."""
    with pytest.raises(errors.NoCodeException):
        common.MinimumLineCount3('\n\n  \n\n  \n\n   \n\n')
Exemple #3
0
def test_MinimumLineCount3_empty_input():
    """Test that MinimumLineCount3 rejects an empty input."""
    with pytest.raises(errors.NoCodeException):
        common.MinimumLineCount3('')