[tahoe-lafs-trac-stream] [Tahoe-LAFS] #4190: Broken tests: failUnlessRaises has been deprecated
Tahoe-LAFS
trac at tahoe-lafs.org
Sun Jan 4 19:41:56 UTC 2026
#4190: Broken tests: failUnlessRaises has been deprecated
-------------------------------+---------------------------
Reporter: hacklschorsch | Owner: hacklschorsch
Type: defect | Status: assigned
Priority: normal | Milestone: undecided
Component: unknown | Version: n/a
Resolution: | Keywords:
Launchpad Bug: |
-------------------------------+---------------------------
Old description:
> `failUnlessRaises` has been deprecated in favor of `assertRaises`.
>
> This breaks tests (see https://app.circleci.com/pipelines/github/tahoe-
> lafs/tahoe-lafs/5377/workflows/cd00a81d-54c3-43be-8041-719ea727c3f1).
>
> Thanks @sajith for the pointer (both to the broken tests and the possible
> cause)!
New description:
`failUnlessRaises` has been deprecated in favor of `assertRaises`.
This breaks tests (see https://app.circleci.com/pipelines/github/tahoe-
lafs/tahoe-lafs/5377/workflows/cd00a81d-54c3-43be-8041-719ea727c3f1).
Thanks @sajith for the pointer (both to the broken tests and the possible
cause)!
{{{
2025-12-30 20:51:45 hacklschorsch sajith: thanks for your link to >
https://app.circleci.com/pipelines/github/tahoe-lafs/tahoe-
lafs/5377/workflows/cd00a81d-54c3-43be-8041-719ea727c3f1
2025-12-30 20:53:20 hacklschorsch Seems most failures here are due to
"[...] object has no attribute 'failUnlessRaises'" - Maybe some dependency
has changed?
2025-12-30 20:55:31 hacklschorsch (in the windows builds)
2025-12-30 20:55:38 hacklschorsch IIRC these worked until a while ago
2025-12-30 21:43:49 sajith hacklschorsch: I am not 100% sure right now,
but I think Python (unittest module maybe?) has deprecated
failUnlessRaises in favor of assertRaises or something, and I suspect that
we've ended up importing failUnlessRaises both from twisted.trial.unittest
and stdlib unittest. Just a hypothesis. I don't have the time to check
right now.
}}}
--
Comment (by hacklschorsch):
I was able to reproduce the behavior on my NixOS development machine with
a `3.13.9` CPython.
Replacing all occurrences of `failUnlessRaises` with `assertRaises` fixes
this problem.
--
Ticket URL: <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/4190#comment:3>
Tahoe-LAFS <https://Tahoe-LAFS.org>
secure decentralized storage
More information about the tahoe-lafs-trac-stream
mailing list