|
|
|
|
|
by mempko
4198 days ago
|
|
I think it is a mistake to think of coupling caused by TDD to be a false positive. What this outlines really is that TDD will force you to edit two files instead of one for many changes. This is a clear indication of how TDD will slow you down. |
|
1. It's a tooling artefact, testing systems certainly don't have to mandate split code and tests. Rust's test framework allows tests in the same file as the tested code, the testing guide recommends that unit test live alongside the code they test[0] and the standard library follows this practice[1]. I'm reasonably sure you can also do so in e.g. py.test[2]
2. I'm not convinced editing two files slows you down, most editors and window managers will let you put both files side-by-side and trivially jump between them. Are java developers slowed down by having to jump between files?
[0] http://doc.rust-lang.org/guide-testing.html#the-test-module
[1] https://github.com/rust-lang/rust/blob/4deb27e/src/libcollec...
[2] by marking all python files as "test modules"