From d842b77cab8ea1ac76c006b7d99455c835475549 Mon Sep 17 00:00:00 2001 From: Andrea Frittoli Date: Thu, 31 Aug 2017 22:30:18 +0100 Subject: [PATCH] Release notes for 0.14.0 There has not been a hacking release in some time. This release is done at the very beginning of the Queens cycle to reduce disruption as much as possible and give plenty of time to solve any issue that may arise or enabling new rules that are disabled by default. Change-Id: If9a54a0b2c07f91ff2f503f1159ff0d23946e2d9 --- HACKING.rst | 12 ++++++++++++ README.rst | 2 ++ .../notes/start-of-queens-c3024ebbb49aef6f.yaml | 8 ++++++++ 3 files changed, 22 insertions(+) create mode 100644 releasenotes/notes/start-of-queens-c3024ebbb49aef6f.yaml diff --git a/HACKING.rst b/HACKING.rst index 3f2aba90..14eaa609 100644 --- a/HACKING.rst +++ b/HACKING.rst @@ -311,6 +311,18 @@ exception possible should be used. ``assertIsNotNone(...)`` is preferred over ``assertNotEqual(None, ...)`` and ``assertIsNot(None, ...)``. Off by default. +- [H204] Use assert(Not)Equal to check for equality. + Unit test assertions tend to give better messages for more specific + assertions. As a result, ``assertEqual(...)`` is preferred over + ``assertTrue(... == ...)``, and ``assertNotEqual(...)`` is preferred over + ``assertFalse(... == ...)``. Off by default. + +- [H205] Use assert(Greater|Less)(Equal) for comparison. + Unit test assertions tend to give better messages for more specific + assertions. As a result, ``assertGreater(Equal)(...)`` is preferred over + ``assertTrue(... >(=) ...)``, and ``assertLess(Equal)(...)`` is preferred over + ``assertTrue(... <(=) ...)``. Off by default. + - [H210] Require ``autospec``, ``spec``, or ``spec_set`` in ``mock.patch()`` or ``mock.patch.object()`` calls (off by default) diff --git a/README.rst b/README.rst index 2744fa90..bbd20be1 100644 --- a/README.rst +++ b/README.rst @@ -95,6 +95,8 @@ Some of the available checks are disabled by default. These checks are: - [H106] Don't put vim configuration in source files. - [H203] Use assertIs(Not)None to check for None. +- [H204] Use assert(Not)Equal to check for equality. +- [H205] Use assert(Greater|Less)(Equal) for comparison. - [H210] Require 'autospec', 'spec', or 'spec_set' in mock.patch/mock.patch.object calls - [H904] Delay string interpolations at logging calls. diff --git a/releasenotes/notes/start-of-queens-c3024ebbb49aef6f.yaml b/releasenotes/notes/start-of-queens-c3024ebbb49aef6f.yaml new file mode 100644 index 00000000..e040684d --- /dev/null +++ b/releasenotes/notes/start-of-queens-c3024ebbb49aef6f.yaml @@ -0,0 +1,8 @@ +--- +features: + - | + This release includes a new check, disabled by default. + [H210] Require 'autospec', 'spec', or 'spec_set' in + mock.patch/mock.patch.object calls + [H204] Use assert(Not)Equal to check for equality. + [H205] Use assert(Greater|Less)(Equal) for comparison.