Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace last logilab-common bits with unittest #5

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
language: python
python:
- "2.6"
- "2.7"
- "3.4"
- "3.5"
install:
- "pip install --use-mirrors coverage coveralls"
- "pip install --use-mirrors -r test_requirements.txt"
- "pip install --use-mirrors git+https://github.com/landscapeio/pylint-plugin-utils.git@develop"
- "pip install --use-mirrors --editable ."
- "pip install coverage coveralls"
- "pip install -r test_requirements.txt"
- "pip install git+https://github.com/landscapeio/pylint-plugin-utils.git@develop"
- "pip install --editable ."
script:
coverage run test/test_func.py
after_success:
Expand Down
9 changes: 4 additions & 5 deletions test/test_func.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@

from os.path import join, dirname, abspath
import unittest
from logilab.common import testlib
from pylint.testutils import make_tests, LintTestUsingModule, LintTestUsingFile, cb_test_gen, linter
import sys

Expand All @@ -17,14 +16,14 @@


def suite():
return testlib.TestSuite([unittest.makeSuite(test, suiteClass=testlib.TestSuite)
for test in make_tests(INPUT_DIR, MESSAGES_DIR,
FILTER_RGX, CALLBACKS)])
return unittest.TestSuite([unittest.makeSuite(test, suiteClass=unittest.TestSuite)
for test in make_tests(INPUT_DIR, MESSAGES_DIR,
FILTER_RGX, CALLBACKS)])

if __name__=='__main__':
if len(sys.argv) > 1:
FILTER_RGX = sys.argv[1]
del sys.argv[1]
testlib.unittest_main(defaultTest='suite')
unittest.main(defaultTest='suite')