[FIX] P3: itertools.iziplongest renamed
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
import itertools
|
||||
try:
|
||||
from itertools import zip_longest
|
||||
except ImportError:
|
||||
from itertools import izip_longest as zip_longest
|
||||
|
||||
import unittest
|
||||
from lxml import etree as ET, html
|
||||
@@ -22,7 +25,7 @@ class TestViewSaving(common.TransactionCase):
|
||||
self.assertEqual(a.attrib, b.attrib)
|
||||
self.assertEqual((a.text or '').strip(), (b.text or '').strip())
|
||||
self.assertEqual((a.tail or '').strip(), (b.tail or '').strip())
|
||||
for ca, cb in itertools.izip_longest(a, b):
|
||||
for ca, cb in zip_longest(a, b):
|
||||
self.eq(ca, cb)
|
||||
|
||||
def setUp(self):
|
||||
@@ -55,7 +58,7 @@ class TestViewSaving(common.TransactionCase):
|
||||
h.SPAN("My Company", attrs(model='res.company', id=1, field='name', type='char')),
|
||||
h.SPAN("+00 00 000 00 0 000", attrs(model='res.company', id=1, field='phone', type='char')),
|
||||
]
|
||||
for actual, expected in itertools.izip_longest(fields, expect):
|
||||
for actual, expected in zip_longest(fields, expect):
|
||||
self.eq(actual, expected)
|
||||
|
||||
def test_embedded_save(self):
|
||||
|
||||
@@ -2,7 +2,10 @@
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from functools import partial
|
||||
from itertools import izip_longest
|
||||
try:
|
||||
from itertools import zip_longest as izip_longuest
|
||||
except ImportError:
|
||||
from itertools import izip_longest
|
||||
|
||||
from lxml import etree
|
||||
from lxml.builder import E
|
||||
|
||||
Reference in New Issue
Block a user