libcloud icon indicating copy to clipboard operation
libcloud copied to clipboard

Only call super() during MockHttp if required

Open s-t-e-v-e-n-k opened this issue 1 year ago • 0 comments

Only instantiate superclasses of MockHttp if we are provided keyword arguments

Description

With pytest 8.2 and above, any class that contains classes is collected, which means they are instantiated, which MockHttp's superclasses do not accept, since they require keyword arguments. To work around this, only call the superclass's init method if we are passed kwargs.

Status

Done, ready for review

Checklist (tick everything that applies)

  • [x] Code linting (required, can be done after the PR checks)
  • [x] Documentation (as code comments)
  • [x] Tests
  • [ ] ICLA (required for bigger changes)

s-t-e-v-e-n-k avatar Sep 03 '24 04:09 s-t-e-v-e-n-k