From 6ecfab9647184555492947c166cf85699ec33eac Mon Sep 17 00:00:00 2001 From: Renato Alves Date: Mon, 25 May 2015 16:52:01 +0100 Subject: [PATCH] test/README - Add guidelines for writing tests --- test/README | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/test/README b/test/README index 03501a329..22e9ea6b4 100644 --- a/test/README +++ b/test/README @@ -82,6 +82,31 @@ both positive and negative aspects, or in other words looks for expected behavior as well as looking for the absence of unexpected behavior. +Conventions for writing a test +------------------------------ + +If you wish to contribute tests, please consider the following guidelines: + + * Tests created after bugs or feature requests should (ideally) have an entry + on https://bug.tasktools.org/ and should include the issue ID in a + docstring or comment. + + * Tests should be added to the file that best matches the "thing" being + tested. For instance, a test on filters should live in filter.t + + * Class and method names should be descriptive of what they are testing. + Example: TestFilterOnReports + + * Docstrings on Python tests are mandatory. The first line is used as title + of the test. + + * Extra information and details should go into multi-line docstrings or + comments. + + * Python tests for bugs or features not yet fixed/implemented should be + decorated with: @unittest.skip("WaitingFor TW-xxxx") + + How to Submit a Test Change/Addition ------------------------------------