Nick Sabalausky:

to three lines of tests for every one line of real code is considered rapid development,

My Python development is just development, it's not meant to be particularly rapid :-)

And I don't think a 3:1 ratio is too much. Among the testing code I also count the doctests, the unittests, the other tests at higher level, the logic tests done with the Python version of QuickCheck, the contracts, the class/module invariants, the loop invariants, and the safety asserts spread in the code.

Take a look at this:
http://www.sqlite.org/testing.html

As of version 3.8.0, the SQLite library consists of approximately 84.3 KSLOC of C code. (KSLOC means thousands of "Source Lines Of Code" or, in other words, lines of code excluding blank lines and comments.) By comparison, the project has 1084 times as much test code and test scripts - 91452.5 KSLOC.<

In my D code I have an average 2.5 lines of testing code or every 1 line of D code, probably thanks to the stronger typing of D (and I think my D/Python code is less buggy than Phobos).

Bye,
bearophile
              • Re: ... Atila Neves via Digitalmars-d-announce
              • Re: ... Brian Rogoff via Digitalmars-d-announce
              • Re: ... Bill Baxter via Digitalmars-d-announce
              • Re: ... Atila Neves via Digitalmars-d-announce
              • Re: ... Meta via Digitalmars-d-announce
              • Re: ... Bruno Medeiros via Digitalmars-d-announce
              • Re: ... Nick Sabalausky via Digitalmars-d-announce
              • Re: ... Jacob Carlborg via Digitalmars-d-announce
              • Re: ... Bruno Medeiros via Digitalmars-d-announce
              • Re: ... Sebastiaan Koppe via Digitalmars-d-announce
              • Re: ... bearophile via Digitalmars-d-announce
              • Re: ... Burp via Digitalmars-d-announce
              • Re: ... bearophile via Digitalmars-d-announce
          • Re: Interview... Jacob Carlborg via Digitalmars-d-announce
        • Re: Interview at ... Ary Borenszweig via Digitalmars-d-announce
  • Re: Interview at Lang.NEXT deadalnix via Digitalmars-d-announce

Reply via email to