From 9b69bf09fc7815a75ea67cc3d9093a0bf2f4956d Mon Sep 17 00:00:00 2001 From: Mike Jackson Date: Tue, 2 Apr 2013 09:14:47 -0700 Subject: [PATCH] Added verbose version of test_a --- testing/Writing.md | 7 +++++++ 1 file changed, 7 insertions(+) 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() -- 2.26.2