Пример #1
0
def test_codeanalysis():
    """Test codeanalysis with pyflakes and pep8."""
    code = open(TEST_FILE).read()
    check_results = check_with_pyflakes(code, TEST_FILE) + \
                    check_with_pep8(code, TEST_FILE) + find_tasks(code)

    assert 85 <= len(check_results) <= 99
Пример #2
0
def test_codeanalysis():
    """Test codeanalysis with pyflakes and pep8."""
    code = open(TEST_FILE).read()
    check_results = check_with_pyflakes(code, TEST_FILE) + \
                    check_with_pep8(code, TEST_FILE) + find_tasks(code)

    assert 85 <= len(check_results) <= 99
Пример #3
0
def test_codeanalysis():
    """Test codeanalysis with pyflakes and pep8."""
    code = open(TEST_FILE).read()
    check_results = check_with_pyflakes(code, TEST_FILE) + \
                    check_with_pep8(code, TEST_FILE) + find_tasks(code)
    if PY2:
        num_results = 89
    else:
        num_results = 90
    assert len(check_results) == num_results
Пример #4
0
def test_codeanalysis_latin():
    """Test codeanalysis with pyflakes and pep8."""
    code = io.open(TEST_FILE_LATIN, encoding="iso-8859-1").read()
    check_results = (check_with_pyflakes(code, TEST_FILE_LATIN) +
                     check_with_pep8(code, TEST_FILE_LATIN) + find_tasks(code))
    if PY2:
        num_results = 1
    else:
        num_results = 2
    assert len(check_results) == num_results
Пример #5
0
def test_codeanalysis():
    """Test codeanalysis with pyflakes and pep8."""
    code = open(TEST_FILE).read()
    check_results = check_with_pyflakes(code, TEST_FILE) + \
                    check_with_pep8(code, TEST_FILE) + find_tasks(code)
    if PY2:
        num_results = 87
    else:
        num_results = 88
    assert len(check_results) == num_results
Пример #6
0
def test_codeanalysis_latin():
    """Test codeanalysis with pyflakes and pep8."""
    code = io.open(TEST_FILE_LATIN, encoding="iso-8859-1").read()
    check_results = (check_with_pyflakes(code, TEST_FILE_LATIN)
                     + check_with_pep8(code, TEST_FILE_LATIN)
                     + find_tasks(code))
    if PY2:
        num_results = 1
    else:
        num_results = 2
    assert len(check_results) == num_results