Skip to content
Merged
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
12 changes: 6 additions & 6 deletions cpplint_clitest.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def run_shell_command(cmd: str, args: str, cwd="."):


class TestUsage:
def testHelp(self):
def test_help(self):
(status, out, err) = run_shell_command(BASE_CMD, "--help")
assert status == 0
assert out == b""
Expand Down Expand Up @@ -183,10 +183,10 @@ def get_extra_command_args(self, cwd):
for case in os.listdir(f"./samples/{folder}-sample")
if case.endswith(".def")
],
name_func=lambda fun, _, x: f"test{x.args[0].capitalize()}Sample-{x.args[1]}",
name_func=lambda fun, _, x: f"test_{x.args[0]}_sample-{x.args[1]}",
)
@pytest.mark.timeout(180)
def testSamples(self, folder, case):
def test_samples(self, folder, case):
self.check_def(os.path.join(f"./samples/{folder}-sample", case + ".def"))


Expand All @@ -198,7 +198,7 @@ def prepare_directory(cls, root):
with open(os.path.join(root, ".git"), "a"):
pass

def testCodeliteSample(self):
def test_codelite_sample(self):
self.check_all_in_folder("./samples/codelite-sample", 1)


Expand All @@ -210,7 +210,7 @@ def prepare_directory(cls, root):
with open(os.path.join(root, ".hg"), "a"):
pass

def testCodeliteSample(self):
def test_codelite_sample(self):
self.check_all_in_folder("./samples/codelite-sample", 1)


Expand All @@ -222,7 +222,7 @@ def prepare_directory(cls, root):
with open(os.path.join(root, ".svn"), "a"):
pass

def testCodeliteSample(self):
def test_codelite_sample(self):
self.check_all_in_folder("./samples/codelite-sample", 1)


Expand Down
14 changes: 11 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,19 @@ lint.ignore = [
"FBT003", # flake8-boolean-trap
"FIX002", # flake8-fixme
"ISC003", # flake8-implicit-str-concat
"N802", # invalid-function-name
"PIE790", # Unnecessary `pass` statement
]
lint.per-file-ignores."cpplint.py" = [ "ICN001", "PERF401", "PLR5501", "PLW0603", "PLW2901", "SIM102", "SIM108" ]
lint.per-file-ignores."cpplint_unittest.py" = [ "FLY002", "PLW0604", "SIM115", "UP031" ]
lint.per-file-ignores."cpplint.py" = [
"ICN001",
"N802",
"PERF401",
"PLR5501",
"PLW0603",
"PLW2901",
"SIM102",
"SIM108",
]
lint.per-file-ignores."cpplint_unittest.py" = [ "FLY002", "N802", "PLW0604", "SIM115", "UP031" ]
lint.mccabe.max-complexity = 29
lint.pylint.allow-magic-value-types = [ "bytes", "int", "str" ]
lint.pylint.max-args = 10 # Default is 5
Expand Down
Loading