Skip to content

[pull] master from testing-cabal:master - #73

Merged
pull[bot] merged 8 commits into
sysfce2:masterfrom
testing-cabal:master
Mar 5, 2026
Merged

pull[bot] merged 8 commits into
sysfce2:masterfrom
testing-cabal:master

Conversation

@pull

@pull pull Bot commented Mar 5, 2026 •

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

stephenfin and others added 8 commits March 4, 2026 15:36
This accepts a tuple of exception types also, as the `isinstance` check
in `_AssertRaisesContext.__exit__` reveals.

Signed-off-by: Stephen Finucane <stephen@that.guru>
Signed-off-by: Stephen Finucane <stephen@that.guru>
Provider overloads so we know we can distinguish between use as
context manager vs the historical function call pattern.

Signed-off-by: Stephen Finucane <stephen@that.guru>
typing: Accept tuple of exceptions in assertRaises
So we can catch type issues like the below:

  def foo(a: str, b: int | None = None):
      ...

  class FooTest(testtools.TestCase):
      def test_foo(self):
          self.assertRaises(Exception, foo, 123, b='abc')

We don't currently have type checking enabled for the tests directory,
but adding a test like the above proves this works.

Signed-off-by: Stephen Finucane <stephen@that.guru>
typing: Make use of ParamSpec
Signed-off-by: Stephen Finucane <stephen@that.guru>
@pull pull Bot locked and limited conversation to collaborators Mar 5, 2026
@pull pull Bot added the ⤵️ pull label Mar 5, 2026
@pull
pull Bot merged commit 81d9dc7 into sysfce2:master Mar 5, 2026

This branch was previously deployed

1 inactive deployment
release — 81d9dc70 Deployed Mar 5, 2026 by pull[bot] via build #25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants