mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-08-07 06:43:02 +03:00
applied patch from Ed Davis to allow "make tests" to work with Python 1.5
* Makefile.am python/tests/Makefile.am python/tests/tstLastError.py: applied patch from Ed Davis to allow "make tests" to work with Python 1.5 Daniel
This commit is contained in:
@@ -1,3 +1,9 @@
|
|||||||
|
Sun May 9 20:40:59 CEST 2004 Daniel Veillard <daniel@veillard.com>
|
||||||
|
|
||||||
|
* Makefile.am python/tests/Makefile.am python/tests/tstLastError.py:
|
||||||
|
applied patch from Ed Davis to allow "make tests" to work
|
||||||
|
with Python 1.5
|
||||||
|
|
||||||
Sun May 9 19:46:13 CEST 2004 Daniel Veillard <daniel@veillard.com>
|
Sun May 9 19:46:13 CEST 2004 Daniel Veillard <daniel@veillard.com>
|
||||||
|
|
||||||
* xmlsave.c: apply fix for XHTML1 formating from Nick Wellnhofer
|
* xmlsave.c: apply fix for XHTML1 formating from Nick Wellnhofer
|
||||||
|
@@ -906,7 +906,7 @@ Relaxtests: xmllint$(EXEEXT)
|
|||||||
|
|
||||||
RelaxNGPythonTests:
|
RelaxNGPythonTests:
|
||||||
@(if [ -x $(PYTHON) ] ; then \
|
@(if [ -x $(PYTHON) ] ; then \
|
||||||
PYTHONPATH=$(top_builddir)/python:$(top_builddir)/python/.libs ; \
|
PYTHONPATH=$(top_builddir)/python:$(top_builddir)/python/.libs:$$PYTHONPATH ; \
|
||||||
export PYTHONPATH; \
|
export PYTHONPATH; \
|
||||||
echo "## Relax-NG Python based test suite 1" ; \
|
echo "## Relax-NG Python based test suite 1" ; \
|
||||||
$(CHECKER) $(PYTHON) $(srcdir)/check-relaxng-test-suite.py ; \
|
$(CHECKER) $(PYTHON) $(srcdir)/check-relaxng-test-suite.py ; \
|
||||||
@@ -916,7 +916,7 @@ RelaxNGPythonTests:
|
|||||||
|
|
||||||
SchemasPythonTests:
|
SchemasPythonTests:
|
||||||
@(if [ -x $(PYTHON) ] ; then \
|
@(if [ -x $(PYTHON) ] ; then \
|
||||||
PYTHONPATH=$(top_builddir)/python:$(top_builddir)/python/.libs; \
|
PYTHONPATH=$(top_builddir)/python:$(top_builddir)/python/.libs:$$PYTHONPATH; \
|
||||||
export PYTHONPATH; \
|
export PYTHONPATH; \
|
||||||
echo "## XML Schemas datatypes Python based test suite" ; \
|
echo "## XML Schemas datatypes Python based test suite" ; \
|
||||||
$(CHECKER) $(PYTHON) $(srcdir)/check-xsddata-test-suite.py ; \
|
$(CHECKER) $(PYTHON) $(srcdir)/check-xsddata-test-suite.py ; \
|
||||||
|
@@ -45,7 +45,7 @@ EXTRA_DIST = $(PYTESTS) $(XMLS)
|
|||||||
|
|
||||||
if WITH_PYTHON
|
if WITH_PYTHON
|
||||||
tests: $(PYTESTS)
|
tests: $(PYTESTS)
|
||||||
-@(PYTHONPATH="..:../.libs:$(srcdir)/.." ; export PYTHONPATH; \
|
-@(PYTHONPATH="..:../.libs:$(srcdir)/..:$$PYTHONPATH" ; export PYTHONPATH; \
|
||||||
for test in $(PYTESTS) ; do echo "-- $$test" ; $(PYTHON) $(srcdir)/$$test ; done)
|
for test in $(PYTESTS) ; do echo "-- $$test" ; $(PYTHON) $(srcdir)/$$test ; done)
|
||||||
else
|
else
|
||||||
tests:
|
tests:
|
||||||
|
@@ -21,7 +21,16 @@ class TestCase(unittest.TestCase):
|
|||||||
# disable the default error handler
|
# disable the default error handler
|
||||||
libxml2.registerErrorHandler(None,None)
|
libxml2.registerErrorHandler(None,None)
|
||||||
try:
|
try:
|
||||||
f(*args)
|
# Emulate f(*args) for older Pythons.
|
||||||
|
l = len(args)
|
||||||
|
if l == 0: f
|
||||||
|
elif l == 1: f(args[0])
|
||||||
|
elif l == 2: f(args[0], args[1])
|
||||||
|
elif l == 3: f(args[0], args[1], args[2])
|
||||||
|
elif l == 4: f(args[0], args[1], args[2], args[3])
|
||||||
|
elif l == 5: f(args[0], args[1], args[2], args[3], args[4])
|
||||||
|
else:
|
||||||
|
self.fail("Too many arguments for function")
|
||||||
except exc:
|
except exc:
|
||||||
e = libxml2.lastError()
|
e = libxml2.lastError()
|
||||||
if e is None:
|
if e is None:
|
||||||
|
Reference in New Issue
Block a user