$ ./cpplint_unittest.py
======================================================================================================== test session starts =========================================================================================================
platform linux -- Python 3.14.4, pytest-9.0.3, pluggy-1.6.0
rootdir: /home/poz/Sources/cpplint
configfile: pyproject.toml
plugins: cov-nixpkgs-stub-1.0.0, timeout-2.4.0
timeout: 481.0s
timeout method: signal
timeout func_only: False
collected 205 items
cpplint_unittest.py .......................................................................................................................................................................................................... [ 98%]
..F [100%]
============================================================================================================== FAILURES ==============================================================================================================
__________________________________________________________________________________________________ TestQuiet.testQuietWithoutErrors __________________________________________________________________________________________________
self = <cpplint_unittest.TestQuiet object at 0x76bc9bef95b0>
def testQuietWithoutErrors(self):
# This will succeed. We filtered out all the known errors for that file.
(return_code, output) = self._runCppLint(
"--quiet", "--filter=" + "-legal/copyright," + "-build/header_guard"
)
assert return_code == 0, output
# No cpplint errors are printed since there were no errors.
assert "[legal/copyright]" not in output
assert "[build/header_guard]" not in output
# --quiet was specified and there were no errors:
# skip the printing of 'Done processing' and 'Total errors..'
assert "Done processing" not in output
assert "Total errors found:" not in output
# Output with no errors must be completely blank!
> assert output == ""
E assert '/home/poz/So...arget_file:\n' == ''
E
E + /home/poz/Sources/cpplint/cpplint.py:7553: DeprecationWarning: codecs.open() is deprecated. Use open() instead.
E + with codecs.open(filename, "r", "utf8", "replace") as target_file:
cpplint_unittest.py:7209: AssertionError
====================================================================================================== short test summary info =======================================================================================================
FAILED cpplint_unittest.py::TestQuiet::testQuietWithoutErrors - assert '/home/poz/So...arget_file:\n' == ''
=================================================================================================== 1 failed, 204 passed in 0.71s ====================================================================================================
caught by nixos CI: https://hydra.nixos.org/build/336720542/log
and confirmed by me locally, here's the logs:
./cpplint_clitest.pycpplint_clitest.log
./cpplint_unittest.py