rally-openstack/tests/hacking
li,chen 44b5f310c5 use function next() instead of next() method on iterator objects
Python 3 introduced a next() function to replace the next() method on
iterator objects. Rather than calling the method on the iterator, the next()
function is called with the iterable object as it's sole parameter, which
calls the underlying __next__() method.

The next() function was backported to Python 2.6 which allows us to use either
the 2.x or 3.x way simultaneously.

Change-Id: I945225b1b0c6c39842a77f4a136e9431b798229f
Closes-Bug: #1403074
2015-01-02 15:41:25 +02:00
..
__init__.py Reorganize test module structure 2014-10-07 13:50:40 +00:00
checks.py use function next() instead of next() method on iterator objects 2015-01-02 15:41:25 +02:00
README.rst use function next() instead of next() method on iterator objects 2015-01-02 15:41:25 +02:00

Rally Style Commandments

Rally Specific Commandments

* [N30x] - Reserved for rules related to mock library
  • [N301] - Ensure that assert_* methods from mock library is used correctly
  • [N302] - Ensure that nonexistent "assert_called" is not used
  • [N303] - Ensure that nonexistent "assert_called_once" is not used
* [N310-N314] - Reserved for rules related to logging
  • [N310] - Ensure that rally.log is used instead of rally.openstack.common.log
  • [N311] - Validate that debug level logs are not translated
  • [N312] - Validate correctness of debug on check.
* [N32x] - Reserved for rules related to assert* methods
  • [N320] - Ensure that assertTrue(isinstance(A, B)) is not used
  • [N321] - Ensure that assertEqual(type(A), B) is not used
  • [N322] - Ensure that assertEqual(A, None) and assertEqual(None, A) are not used
  • [N323] - Ensure that assertTrue/assertFalse(A in/not in B) are not used with collection contents
  • [N324] - Ensure that assertEqual(A in/not in B, True/False) and assertEqual(True/False, A in/not in B) are not used with collection contents
* [N33x] - Reserved for rules related to Python 3 compatibility
  • [N330] - Ensure that dict.iteritems() is not used
  • [N331] - Ensure that basestring is not used
  • [N332] - Ensure that StringIO.StringIO is not used
  • [N333] - Ensure that urlparse is not used
  • [N334] - Ensure that itertools.imap is not used
  • [N335] - Ensure that xrange is not used
  • [N336] - Ensure that string.lowercase and string.uppercase are not used
  • [N337] - Ensure that next() method on iterator objects is not used
  • [N340] - Ensure that we are importing always from rally import objects