The noop tests that dont pass



  • Hi,

    Maintaining a python project where i have to touch the part of a colleague, i found that his 72 automated tests are all named "test_setup" and each have only a single line : "pass". No object, no assert at all. Nothing. All is done in init.py files and many more files dissiminated in the project. A nightmare.

    I found the anti-refactoring regression test suite !

    Étienne



  • @bersace said:

    i have to touch the part of a colleague
    snicker

     @bersace said:

    i found that his 72 automated tests are all named "test_setup" and each have only a single line : "pass". No object, no assert at all. Nothing. All is done in init.py files and many more files dissiminated in the project.
    Yeah, but can you say that your code has never broken any tests? This guy knows enterprisy code.



  • @bersace said:

    i have to touch the part of a colleague

    Sounds like you need to view the "Sexual Harassment and You" video again.



  • @toth said:

    Sounds like you need to view the "Sexual Harassment and You" video again.
     

    I watched the "Morbiuswilters and You" video. That was quite enough.



  • @dhromed said:

    @toth said:

    Sounds like you need to view the "Sexual Harassment and You" video again.
     

    I watched the "Morbiuswilters and You" video. That was quite enough.

    "Have you noticed your voice changing?  Terrible acne all over your face and fur where there wasn't fur before?  Do your nethers twitch and tingle nervously waiting for MorbiusWilters' next post?  Well, it's perfectly natural and all part of God's plan for you."



  • @morbiuswilters said:

    "Have you noticed your voice changing?  Terrible acne all over your face and fur where there wasn't fur before?  Do your nethers twitch and tingle nervously waiting for MorbiusWilters' next post?  Well, it's perfectly natural and all part of God's plan for you."
     

    It rings so true for me!

     

    :'''O



  • @bersace said:

    Hi, Maintaining a python project where i have to touch the part of a colleague, i found that his 72 automated tests are all named "test_setup" and each have only a single line : "pass". No object, no assert at all. Nothing. All is done in init.py files and many more files dissiminated in the project. A nightmare. I found the anti-refactoring regression test suite ! Étienne

    Maybe it's his idea of "test first development".  The standards say he has to write a test first, so he does.  I know a bunch of people who are so against automated testing that they will do anything to not write useful tests, even if it takes longer than actually writing tests.

    It's just like when you put in a check-in script that rejects check-ins with no comment, so people start doing check-ins with a comment of "Modified".



  • Disappointed after reading the thread title: was expecting all the tests to return "fail" instead!



  • @Zemm said:

    Disappointed after reading the thread title: was expecting all the tests to return "fail" instead!

    I was expecting something more along the lines of

    %  ./test_setup
      File "./test_setup", line 12
        self.assertTrue(pass)
                           ^
    SyntaxError: invalid syntax
    %

Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.