コード例 #1
0
ファイル: test_linters.py プロジェクト: klen/pylama
def test_eradicate():
    eradicate = LINTERS.get('eradicate')
    errors = eradicate.run('', code="\n".join([
        "#import os",
        "# from foo import junk",
        "#a = 3",
        "a = 4",
        "#foo(1, 2, 3)",
    ]))
    assert len(errors) == 4
コード例 #2
0
ファイル: test_linters.py プロジェクト: pramodjha/snippet-app
def test_eradicate():
    eradicate = LINTERS.get('eradicate')
    errors = eradicate.run('', code="\n".join([
        "#import os",
        "# from foo import junk",
        "#a = 3",
        "a = 4",
        "#foo(1, 2, 3)",
    ]))
    assert len(errors) == 4
コード例 #3
0
ファイル: tests.py プロジェクト: sethwoodworth/pylama
    def test_mccabe(self):
        from pylama.lint.extensions import LINTERS

        mccabe = LINTERS.get('mccabe')
        errors = mccabe.run('dummy.py', '')
        self.assertEqual(errors, [])
コード例 #4
0
ファイル: test_linters.py プロジェクト: klen/pylama
def test_mccabe():
    mccabe = LINTERS.get('mccabe')
    errors = mccabe.run('dummy.py', '', params={})
    assert errors == []
コード例 #5
0
ファイル: test_linters.py プロジェクト: pramodjha/snippet-app
def test_mccabe():
    mccabe = LINTERS.get('mccabe')
    errors = mccabe.run('dummy.py', '', params={})
    assert errors == []
コード例 #6
0
ファイル: tests.py プロジェクト: ClearcodeHQ/pylama
    def test_mccabe(self):
        from pylama.lint.extensions import LINTERS

        mccabe = LINTERS.get('mccabe')
        errors = mccabe.run('dummy.py', '')
        self.assertEqual(errors, [])