Skip to content

Commit

Permalink
Add flake8 plugins for linting tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Hynes committed Mar 7, 2019
1 parent c89cab5 commit feb8aee
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 13 deletions.
2 changes: 0 additions & 2 deletions tests/property/test_transformation.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,3 @@ def test_objects_to_array(list_objects):
list_objects_new = list(array_to_objects(array, class_spatial))

assert list_objects_new == list_objects


1 change: 1 addition & 0 deletions tests/unit/test_comparison.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import pytest

from skspatial.objects import Point, Vector, Line


Expand Down
1 change: 1 addition & 0 deletions tests/unit/test_intersection.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import pytest

from skspatial.objects import Point, Vector, Line, Plane


Expand Down
10 changes: 2 additions & 8 deletions tests/unit/test_transformation.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,8 @@
@pytest.mark.parametrize(
"list_arrays, array_expected",
[
(
[[0]],
np.array([[0, 0, 0]]),
),
(
[[0, 1], [5.3, 2, -1]],
np.array([[0, 1, 0], [5.3, 2, -1]]),
),
([[0]], np.array([[0, 0, 0]])),
([[0, 1], [5.3, 2, -1]], np.array([[0, 1, 0], [5.3, 2, -1]])),
(
[[-1.1], [10.5, 2, 3], [5, 2, 1]],
np.array([[-1.1, 0, 0], [10.5, 2, 3], [5, 2, 1]]),
Expand Down
9 changes: 6 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tox]
envlist =
py36,
lint,
lint_code,
lint_tests,

[travis]
Expand All @@ -20,10 +20,10 @@ deps =
pytest-cov
hypothesis
commands =
pytest --basetemp={envtmpdir} --doctest-modules --cov=skspatial
pytest --basetemp={envtmpdir} --doctest-modules --cov=skspatial
python -m doctest README.rst

[testenv:lint]
[testenv:lint_code]
deps =
black
flake8
Expand All @@ -39,6 +39,9 @@ commands =
deps =
black
flake8
flake8-import-order
flake8-blind-except
flake8-builtins
commands =
black -S tests
flake8 tests

0 comments on commit feb8aee

Please sign in to comment.