Add BBB markers and avoid tests to trigger deprecation warnings.

parent 7a4a610b
......@@ -8,7 +8,7 @@ import glob
from TAL.tests import utils
import unittest
from TAL import runtest
from zope.tal import runtest
class FileTestCase(unittest.TestCase):
......
......@@ -21,8 +21,18 @@ from TAL.tests import utils
import unittest
# BBB 2005/05/01 -- to be changed after 12 months
# ignore deprecation warnings on import for now
import warnings
showwarning = warnings.showwarning
warnings.showwarning = lambda *a, **k: None
# this old import should remain here until the TAL package is
# completely removed, so that API backward compatibility is properly
# tested
from TAL import HTMLTALParser
from TAL.TALDefs import TAL_VERSION, TALError, METALError
# restore warning machinery
warnings.showwarning = showwarning
class TestCaseBase(unittest.TestCase):
......
......@@ -6,10 +6,20 @@ import unittest
from StringIO import StringIO
# BBB 2005/05/01 -- to be changed after 12 months
# ignore deprecation warnings on import for now
import warnings
showwarning = warnings.showwarning
warnings.showwarning = lambda *a, **k: None
# this old import should remain here until the TAL package is
# completely removed, so that API backward compatibility is properly
# tested
from TAL.HTMLTALParser import HTMLTALParser
from TAL.TALInterpreter import TALInterpreter
from TAL.TALGenerator import TALGenerator
from TAL.DummyEngine import DummyEngine
# restore warning machinery
warnings.showwarning = showwarning
page1 = '''<html metal:use-macro="main"><body>
......
......@@ -21,12 +21,24 @@ import unittest
from StringIO import StringIO
# BBB 2005/05/01 -- to be changed after 12 months
# ignore deprecation warnings on import for now
import warnings
showwarning = warnings.showwarning
warnings.showwarning = lambda *a, **k: None
# this old import should remain here until the TAL package is
# completely removed, so that API backward compatibility is properly
# tested
from TAL.TALDefs import METALError, I18NError
from TAL.HTMLTALParser import HTMLTALParser
from TAL.TALParser import TALParser
from TAL.TALInterpreter import TALInterpreter
from TAL.DummyEngine import DummyEngine, DummyTranslationService
from TAL.TALInterpreter import interpolate
# restore warning machinery
warnings.showwarning = showwarning
from TAL.tests import utils
from zope.i18nmessageid import Message
......
......@@ -7,7 +7,17 @@ import sys
from TAL.tests import utils
import unittest
# BBB 2005/05/01 -- to be changed after 12 months
# ignore deprecation warnings on import for now
import warnings
showwarning = warnings.showwarning
warnings.showwarning = lambda *a, **k: None
# this old import should remain here until the TAL package is
# completely removed, so that API backward compatibility is properly
# tested
from TAL import XMLParser
# restore warning machinery
warnings.showwarning = showwarning
class EventCollector(XMLParser.XMLParser):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment