[tahoe-lafs-trac-stream] [Tahoe-LAFS] #3984: test_pidfile_contents uses check_pid_process like it is a context manager, but it is not

Tahoe-LAFS trac at tahoe-lafs.org
Mon Mar 13 13:13:44 UTC 2023


#3984: test_pidfile_contents uses check_pid_process like it is a context manager,
but it is not
---------------------+---------------------------
 Reporter:  exarkun  |          Owner:
     Type:  defect   |         Status:  new
 Priority:  normal   |      Milestone:  undecided
Component:  unknown  |        Version:  n/a
 Keywords:           |  Launchpad Bug:
---------------------+---------------------------
 A recent CI run failed like this:

 {{{
       | Traceback (most recent call last):
       |   File "/home/runner/work/tahoe-lafs/tahoe-
 lafs/.tox/pypy39/lib/pypy3.9/site-
 packages/allmydata/test/cli/test_run.py", line 196, in
 test_pidfile_contents
       |     with check_pid_process(pidfile):
       | AttributeError: 'NoneType' object is not a context manager (no
 __enter__/__exit__ method)
       | Falsifying example: test_pidfile_contents(
       |     content='0\r0',
       |
 self=<allmydata.test.cli.test_run.RunTests.test_pidfile_contents
 id=0x4bfb088>,
       | )
 }}}

 Due to https://tahoe-lafs.org/trac/tahoe-lafs/ticket/3983 the test managed
 to all the way to `check_pid_process` returning `None` instead of raising
 an exception and then the runtime got angry about `with None:`.

--
Ticket URL: <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/3984>
Tahoe-LAFS <https://Tahoe-LAFS.org>
secure decentralized storage


More information about the tahoe-lafs-trac-stream mailing list