Skip to content

Commit

Permalink
Split out tests of tools
Browse files Browse the repository at this point in the history
  • Loading branch information
Jing Wang committed Jul 8, 2023
1 parent afcc88f commit 1ac7e4c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 16 deletions.
16 changes: 0 additions & 16 deletions test_pyhdfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -575,19 +575,3 @@ def test_equality(self) -> None:
assert x != y
assert y == z
assert not (y != z)


class TestTools(unittest.TestCase):
def test_black(self) -> None:
subprocess.check_call(["black", "--check", os.path.dirname(__file__)])

def test_flake8(self) -> None:
subprocess.check_call(["flake8"], cwd=os.path.dirname(__file__))

def test_isort(self) -> None:
subprocess.check_call(
["isort", "--check-only", "--diff", os.path.dirname(__file__)]
)

def test_mypy(self) -> None:
subprocess.check_call(["mypy", os.path.dirname(__file__)])
20 changes: 20 additions & 0 deletions test_tools.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import os
import subprocess


def test_black() -> None:
subprocess.check_call(["black", "--check", os.path.dirname(__file__)])


def test_flake8() -> None:
subprocess.check_call(["flake8"], cwd=os.path.dirname(__file__))


def test_isort() -> None:
subprocess.check_call(
["isort", "--check-only", "--diff", os.path.dirname(__file__)]
)


def test_mypy() -> None:
subprocess.check_call(["mypy", os.path.dirname(__file__)])

0 comments on commit 1ac7e4c

Please sign in to comment.