bloomberg/blazingmq

IT: replace `assert` statements with custom checkers

Opened this issue · 4 comments

A few reasons:

  1. Default assert statements might be disabled, they are intended to be switched on/off.
  2. The main reason why assert statements are used is that it is an already existing language feature.
  3. assert statements don't allow to set up a breakpoint to intercept any failure with a debugger. If we have a custom checker, we can have one simple place for breakpoints that allows to intercept anything.

Hi I was wondering if I could be assigned this issue. Would love to work on this enhancement.

Hi @SrinathhSatuluri, this task is a bit too involved for new contributors. It also requires communicating with the team to discuss the proposal.
If you are looking for open-source contributions, I created a simpler task #968

Hi @678098 ! I've looked into replacing assert statements in integration tests. I really love assertpy is a mature assertion library that solves all problems.
If the project policy doesn’t really support adding dependencies, I could write a simple custom solution with similar functionality.

Hi @MorganaFuture, thank you for this, assertpy looks really interesting.
I have a WIP PR where I test and evaluate a better test conditions checks #980
Will also try assertpy