mirror of
https://github.com/darlinghq/darling-libxml2.git
synced 2025-03-01 06:56:10 +00: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:
parent
f0244cea96
commit
6d38c750b7
@ -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>
|
||||
|
||||
* xmlsave.c: apply fix for XHTML1 formating from Nick Wellnhofer
|
||||
|
@ -906,7 +906,7 @@ Relaxtests: xmllint$(EXEEXT)
|
||||
|
||||
RelaxNGPythonTests:
|
||||
@(if [ -x $(PYTHON) ] ; then \
|
||||
PYTHONPATH=$(top_builddir)/python:$(top_builddir)/python/.libs ; \
|
||||
PYTHONPATH=$(top_builddir)/python:$(top_builddir)/python/.libs:$$PYTHONPATH ; \
|
||||
export PYTHONPATH; \
|
||||
echo "## Relax-NG Python based test suite 1" ; \
|
||||
$(CHECKER) $(PYTHON) $(srcdir)/check-relaxng-test-suite.py ; \
|
||||
@ -916,7 +916,7 @@ RelaxNGPythonTests:
|
||||
|
||||
SchemasPythonTests:
|
||||
@(if [ -x $(PYTHON) ] ; then \
|
||||
PYTHONPATH=$(top_builddir)/python:$(top_builddir)/python/.libs; \
|
||||
PYTHONPATH=$(top_builddir)/python:$(top_builddir)/python/.libs:$$PYTHONPATH; \
|
||||
export PYTHONPATH; \
|
||||
echo "## XML Schemas datatypes Python based test suite" ; \
|
||||
$(CHECKER) $(PYTHON) $(srcdir)/check-xsddata-test-suite.py ; \
|
||||
|
@ -45,7 +45,7 @@ EXTRA_DIST = $(PYTESTS) $(XMLS)
|
||||
|
||||
if WITH_PYTHON
|
||||
tests: $(PYTESTS)
|
||||
-@(PYTHONPATH="..:../.libs:$(srcdir)/.." ; export PYTHONPATH; \
|
||||
-@(PYTHONPATH="..:../.libs:$(srcdir)/..:$$PYTHONPATH" ; export PYTHONPATH; \
|
||||
for test in $(PYTESTS) ; do echo "-- $$test" ; $(PYTHON) $(srcdir)/$$test ; done)
|
||||
else
|
||||
tests:
|
||||
|
@ -21,7 +21,16 @@ class TestCase(unittest.TestCase):
|
||||
# disable the default error handler
|
||||
libxml2.registerErrorHandler(None,None)
|
||||
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:
|
||||
e = libxml2.lastError()
|
||||
if e is None:
|
||||
|
Loading…
x
Reference in New Issue
Block a user