Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lambdalisue committed Jul 1, 2017
1 parent 480db80 commit 2bb0bae
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 8 deletions.
8 changes: 2 additions & 6 deletions .travis.yml
Expand Up @@ -8,15 +8,11 @@ python:

install:
- pip install pytest --upgrade
- pip install neovim
- pip install mypy-lang flake8 coverage pytest-flake8 pytest-cov
- if [[ "$TRAVIS_PYTHON_VERSION" = "3.3" ]]; then pip install enum34 typing; fi
- if [[ "$TRAVIS_PYTHON_VERSION" = "3.4" ]]; then pip install typing; fi
- pip install coveralls
- pip install -qr test/requirements-test.txt

script:
- py.test --cov
- mypy --silent-imports rplugin/python3
- pytest

after_success:
- coveralls
14 changes: 13 additions & 1 deletion setup.cfg
@@ -1,9 +1,21 @@
[aliases]
test = pytest

[tool:pytest]
addopts = --doctest-modules --flake8
addopts =
--doctest-modules
--mypy
--cov
--flake8
testpaths = test rplugin/python3/lista
norecursedirs = .git rplugin/python3/lista/prompt/docs

[flake8]
exclude = .git,__pycache__,test/*,docs/*,rplugin/python3/lista/prompt/docs/conf.py
max-complexity = 10

# D105 Missing docstring in magic method
ignore = D105

[mypy]
ignore_missing_imports = True
2 changes: 1 addition & 1 deletion test/conftest.py
Expand Up @@ -9,7 +9,7 @@

@pytest.fixture
def nvim():
nvim = MagicMock(spec='neovim.Nvim')
nvim = MagicMock(autospec='neovim.Nvim')
nvim.vars = {}
nvim.options = {
'encoding': 'utf-8',
Expand Down
8 changes: 8 additions & 0 deletions test/requirements-test.txt
@@ -0,0 +1,8 @@
neovim
pytest
pytest-flake8
pytest-mypy
pytest-cov
typed-ast
enum34; python_version < '3.4'
typing; python_version < '3.5'

0 comments on commit 2bb0bae

Please sign in to comment.