Skip test_check_doubled_words hacking check UT

The referenced bug has reared its ugly head in python 2.7.15 in (at
least) releaselevel='final', which is being used in the gate, as well as
3.6.7+. Disable the test entirely until we can fix or work around the
bug in the tokenizer.

The hacking check itself is still in place. This is just disabling the
unit test that tries to test the hacking check.

NOTE: Noticed that the hacking check is operating on physical_line,
which means it'll catch things like:

 "This is the the error"

but not:

 ("This is the "
  "the error")

...which is probably way more likely.

Change-Id: I8826c3fb89690805baae6b9b7b48985abb8d62d3
Related-Bug: #1804062
This commit is contained in:
Eric Fried 2019-06-11 10:24:11 -05:00
parent e8b6b0bc78
commit 18ba6e6e6a
1 changed files with 2 additions and 4 deletions

View File

@ -12,7 +12,6 @@
# License for the specific language governing permissions and limitations
# under the License.
import sys
import textwrap
import mock
@ -581,9 +580,8 @@ class HackingTestCase(test.NoDBTestCase):
# TODO(cdent): Remove when https://bugs.launchpad.net/nova/+bug/1804062
# is resolved.
@testtools.skipIf(
sys.version_info[0:3] >= (3, 6, 7),
'tokenize has backwards incompatible behavior from 3.6.7')
@testtools.skip(
'tokenize has backwards incompatible behavior from 3.6.7 and 2.7.15')
def test_check_doubled_words(self):
errors = [(1, 0, "N343")]