glance/HACKING.rst
Chris Buccella 3994eeb862 Add hacking checks
There have been a handful of changes recently to fix stylistic bugs
in the unit tests (example: If41a7). The changes themselves were fine,
but there are two problems:

1) The stylistic changes they made were not listed in HACKING.rst
2) They were one-time changes; the rules that were violated will
   continue to be violated.

This change updates HACKING.rst to include a few of the stylistic
rules that have been fixed recently, and adds checks to ensure that
they will be enforced going forward. This is based on nova's hacking
checks.

Change-Id: Ic115342605c472f3a5d255aa570ecb60175ca087
2014-06-10 02:06:56 +00:00

564 B

glance Style Commandments =======================

glance Specific Commandments --------------------------

  • [G316] Change assertTrue(isinstance(A, B)) by optimal assert like assertIsInstance(A, B)
  • [G317] Change assertEqual(type(A), B) by optimal assert like assertIsInstance(A, B)
  • [G318] Change assertEqual(A, None) or assertEqual(None, A) by optimal assert like assertIsNone(A)
  • [G319] Validate that debug level logs are not translated