From: Mike Jackson Date: Tue, 2 Apr 2013 16:14:47 +0000 (-0700) Subject: Added verbose version of test_a X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=9b69bf09fc7815a75ea67cc3d9093a0bf2f4956d;p=swc-testing-nose.git Added verbose version of test_a --- diff --git a/testing/Writing.md b/testing/Writing.md index 3e4ffeb..f2ccdf6 100755 --- a/testing/Writing.md +++ b/testing/Writing.md @@ -103,6 +103,13 @@ Typically, a test function, * Runs the function or component being tested on the inputs to get some actual outputs. * Checks that the actual outputs match the expected outputs. We use assertions as part of this checking. We can check both that conditions hold and that conditions do not hold. +So, we could rewrite `test_a`, as the more, verbose, but equivalent, + + def test_a(): + expected = NUCLEOTIDES['A'] + actual = calculate_weight('A') + assert expected == actual + Python `assert` allows us to check, assert should_be_true()