Test-Driven Development with Python by Harry J.W. Percival

Test-Driven Development with Python by Harry J.W. Percival

Author:Harry J.W. Percival
Language: eng
Format: epub, pdf
Publisher: O'Reilly Media
Published: 2017-08-18T04:00:00+00:00


QUnit.test("smoke test", function (assert) { assert.equal(1, 1, "Maths works!"); });

The QUnit.test function defines a test case, a bit like def test_something(self) did in Python. Its first argument is a name for the test, and the second is a function for the body of the test.

The assert.equal function is an assertion; very much like assertEqual, it compares two arguments. Unlike in Python, though, the message is displayed both for failures and for passes, so it should be phrased as a positive rather than a negative.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.