Skip to content

Commit

Permalink
TestUtilities.py: Add PEP8TestBear, Jinja2TestBear
Browse files Browse the repository at this point in the history
Add PEP8TestBear and Jinja2TestBear for running the
tests on NestedLanguage files
  • Loading branch information
Naveenaidu committed Aug 21, 2019
1 parent 6cd1bc6 commit 1c0035d
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/TestUtilities.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
'EchoBear',
'ErrorTestBear',
'JavaTestBear',
'Jinja2TestBear',
'LineCountTestBear',
'PEP8TestBear',
'RaiseTestBear',
'RaiseTestExecuteBear',
'SpaceConsistencyTestBear',
Expand Down Expand Up @@ -89,8 +91,10 @@
"<class 'AspectsGeneralTestBear.AspectsGeneralTestBear'>",
"<ErrorTestBear linter class (wrapping 'I_do_not_exist')>",
"<class 'JavaTestBear.JavaTestBear'>",
"<class 'Jinja2TestBear.Jinja2TestBear'>",
"<class 'LineCountTestBear.LineCountTestBear'>",
"<EchoBear linter class (wrapping 'echo')>",
"<class 'PEP8TestBear.PEP8TestBear'>",
"<class 'RaiseTestBear.RaiseTestBear'>",
"<class 'RaiseTestBear.RaiseTestExecuteBear'>",
"<class 'TestBear.TestBear'>",
Expand Down
14 changes: 14 additions & 0 deletions tests/test_bears/Jinja2TestBear.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
from coalib.bears.LocalBear import LocalBear


class Jinja2TestBear(LocalBear):
LANGUAGES = {'jinja2'}
LICENSE = 'AGPL-3.0'
CAN_FIX = {'Formatting'}

def run(self, filename, file, config: str = ''):
"""
Bear to test that collecting of languages works.
:param config: An optional dummy config file.
"""
14 changes: 14 additions & 0 deletions tests/test_bears/PEP8TestBear.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
from coalib.bears.LocalBear import LocalBear


class PEP8TestBear(LocalBear):
LANGUAGES = {'python'}
LICENSE = 'AGPL-3.0'
CAN_FIX = {'Formatting'}

def run(self, filename, file, config: str = ''):
"""
Bear to test that collecting of languages works.
:param config: An optional dummy config file.
"""

0 comments on commit 1c0035d

Please sign in to comment.