mirror of
https://github.com/google/styleguide.git
synced 2024-03-22 13:11:43 +08:00
cpplint_unittest.py: Define xrange for Python 3
This commit is contained in:
parent
d98652e03b
commit
099f059086
|
@ -43,6 +43,11 @@ import unittest
|
||||||
|
|
||||||
import cpplint
|
import cpplint
|
||||||
|
|
||||||
|
try:
|
||||||
|
xrange # Python 2
|
||||||
|
except NameError:
|
||||||
|
xrange = range # Python 3
|
||||||
|
|
||||||
|
|
||||||
# This class works as an error collector and replaces cpplint.Error
|
# This class works as an error collector and replaces cpplint.Error
|
||||||
# function for the unit tests. We also verify each category we see
|
# function for the unit tests. We also verify each category we see
|
||||||
|
|
Loading…
Reference in New Issue
Block a user