I'm trying to package your module as an rpm package. So I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account.
+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-flake8-pyi-20.10.0-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-flake8-pyi-20.10.0-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.12, pytest-6.2.5, py-1.11.0, pluggy-0.13.1
benchmark: 3.4.1 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000)
Using --randomly-seed=3873507879
rootdir: /home/tkloczko/rpmbuild/BUILD/flake8-pyi-20.10.0
plugins: mock-3.6.1, cov-2.12.1, anyio-3.3.4, flaky-3.7.0, console-scripts-1.2.0, asyncio-0.16.0, freezegun-0.4.2, flake8-1.0.7, rerunfailures-9.1.1, yagot-0.5.0, forked-1.4.0, ordering-0.6, xdist-2.5.0, Faker-10.0.0, benchmark-3.4.1, pyfakefs-4.5.3, datadir-1.3.1, regressions-2.2.0, timeout-2.0.2, randomly-3.10.3, perf-0.10.1, trio-0.7.0, requests-mock-1.9.3, hypothesis-6.31.5, easy-server-0.8.0
collected 15 items
tests/test_pyi.py .....F.......F. [100%]
================================================================================= FAILURES =================================================================================
______________________________________________________________________ PyiTestCase.test_function_def _______________________________________________________________________
self = <tests.test_pyi.PyiTestCase testMethod=test_function_def>
def test_function_def(self) -> None:
stdout_lines = (
'5:5: Y009 Empty body should contain "...", not "pass"',
'19:5: Y010 Function body must contain only "..."',
'23:5: Y010 Function body must contain only "..."',
)
> self.checkFileOutput("emptyfunctions.pyi", stdout_lines=stdout_lines)
tests/test_pyi.py:182:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/test_pyi.py:83: in checkFileOutput
check_output(
tests/test_pyi.py:78: in check_output
self.assertMultiLineEqual(expected, actual)
E AssertionError: 'empt[85 chars]pyi:19:5: Y010 Function body must contain only[71 chars]..."' != 'empt[85 chars]pyi:10:1: B903 Data class should either be imm[585 chars]..."'
E emptyfunctions.pyi:5:5: Y009 Empty body should contain "...", not "pass"
E + emptyfunctions.pyi:10:1: B903 Data class should either be immutable or use __slots__ to save memory. Use collections.namedtuple to generate an immutable class, or enumerate the attributes in a __slot__ declaration in the class to leave attributes mutable.
E + emptyfunctions.pyi:14:1: B903 Data class should either be immutable or use __slots__ to save memory. Use collections.namedtuple to generate an immutable class, or enumerate the attributes in a __slot__ declaration in the class to leave attributes mutable.
E emptyfunctions.pyi:19:5: Y010 Function body must contain only "..."
E emptyfunctions.pyi:23:5: Y010 Function body must contain only "..."
_______________________________________________________________________ PyiTestCase.test_empty_init ________________________________________________________________________
self = <tests.test_pyi.PyiTestCase testMethod=test_empty_init>
def test_empty_init(self) -> None:
# should have no output if it's not explicitly selected
> self.checkFileOutput("emptyinit.pyi", stdout_lines=())
tests/test_pyi.py:186:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/test_pyi.py:83: in checkFileOutput
check_output(
tests/test_pyi.py:78: in check_output
self.assertMultiLineEqual(expected, actual)
E AssertionError: '' != 'emptyinit.pyi:1:1: B903 Data class should[204 chars]ble.'
E + emptyinit.pyi:1:1: B903 Data class should either be immutable or use __slots__ to save memory. Use collections.namedtuple to generate an immutable class, or enumerate the attributes in a __slot__ declaration in the class to leave attributes mutable.
========================================================================= short test summary info ==========================================================================
FAILED tests/test_pyi.py::PyiTestCase::test_function_def - AssertionError: 'empt[85 chars]pyi:19:5: Y010 Function body must contain only[71 chars]..."' != 'empt[85 chars...
FAILED tests/test_pyi.py::PyiTestCase::test_empty_init - AssertionError: '' != 'emptyinit.pyi:1:1: B903 Data class should[204 chars]ble.'
====================================================================== 2 failed, 13 passed in 14.35s =======================================================================
error: Bad exit status from /var/tmp/rpm-tmp.mkEK9d (%check)