@@ -381,6 +381,7 @@ AssertionError: write me!
381
381
Brilliant--no need to sit around waiting for all the FTs
382
382
when we're only interested in a single one.
383
383
Although we need to remember to run all of them now and again, to check for regressions.
384
+ It's a good habit to run all the tests before making a `git commit`.
384
385
Later in the book we'll see how to give that task over to an automated Continuous Integration loop.
385
386
For now, let's commit!
386
387
@@ -566,9 +567,10 @@ saves you from having to use `def..():` and an indented block:
566
567
5
567
568
----
568
569
569
- In our case, we're using it to transform a bit of code that would otherwise be
570
- executed immediately into a function that we can pass as an argument,
570
+ In our case, we're using it to transform a bit of code - that would otherwise be
571
+ executed immediately - into a function that we can pass as an argument,
571
572
and that can be executed later, and multiple times:
573
+ // CSANAD: I think it's easier to read like this.
572
574
573
575
[role="skipme"]
574
576
[source,python]
@@ -772,7 +774,8 @@ $ *cp src/lists/tests/test_views.py src/lists/tests/test_models.py*
772
774
----
773
775
774
776
And strip _test_models.py_ down
775
- to being just the one test--it means it needs far fewer imports:
777
+ to being just the one test:
778
+ // CSANAD: the imports are unchanged, only the view-related tests are removed
776
779
777
780
[role="sourcecode"]
778
781
.src/lists/tests/test_models.py (ch11l016)
0 commit comments