43
C0D4
5y

Why... why the fuck do people write unit tests and then comment out the god damn fucking assertion lines....
Like what the flying fuck? Cool, we can get some code coverage marks but for fuck sake actually let your tests do their fucking job!!!

Oh, the asserts fail?
Well fucking sort that shit out instead of commenting them out.

I don't get it, if you're going to write tests, fucking test something with them, or we'd be better of without them.

Comments
  • 4
    When you need X% code coverage to get your promotion, but just can't write anything that works 😁
  • 8
    1. Run tests.

    2. Tests fail.

    3. Remove checks that fail from tests.

    4. Tests pass.

    Fixed!
  • 0
    Could it be the case that someone else wrote the tests, they worked, and then someone who made changes was too dumb to understand tests and screwed up the perfectly functioning tests by commenting them out?
  • 2
    @Hazarth I would love to say that was the case, but no 😔
  • 1
    @C0D4 well that's depressing
  • 0
    assert(floatvalue == 0.0);

    ...
  • 0
    Could it be someone was making some changes and the failing test was annoying them, so they commented out until the changes were finished and then stupidly did ` git add . ` ?
Add Comment