Skip to content
This repository has been archived by the owner on Apr 29, 2023. It is now read-only.

Test suite does not work #130

Open
mweinelt opened this issue May 12, 2021 · 2 comments
Open

Test suite does not work #130

mweinelt opened this issue May 12, 2021 · 2 comments

Comments

@mweinelt
Copy link

I'm trying to get the test suite running, but it does not seem to work (anymore?).

======================================================================
ERROR: testDate (test_trac_0121.TestTrac0121)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_trac_0121", line 25, in testDate
  File "/nix/store/q6gfck5czr67090pwm53xrdyhpg6bx67-python3-3.8.9/lib/python3.8/copy.py", line 92, in copy
    rv = reductor(4)
  File "/build/PyXB-1.2.6/pyxb/binding/datatypes.py", line 461, in __reduce_ex__
    return (self.__class__, (self.xsdLiteral(),))
  File "/build/PyXB-1.2.6/pyxb/binding/basis.py", line 1010, in xsdLiteral
    return self.XsdLiteral(self)
  File "/build/PyXB-1.2.6/pyxb/binding/datatypes.py", line 761, in XsdLiteral
    value += datetime.timedelta(minutes=cls.__MinutesPerHalfDay)
  File "/build/PyXB-1.2.6/pyxb/binding/datatypes.py", line 685, in __new__
    raise TypeError('function takes %d arguments plus optional tzinfo (%d given)' % (len(cls._ValidFields), len(args)))
TypeError: function takes 3 arguments plus optional tzinfo (8 given)

======================================================================
ERROR: testTimezoned (test_date.Test_date)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_date", line 44, in testTimezoned
  File "/build/PyXB-1.2.6/pyxb/binding/basis.py", line 1010, in xsdLiteral
    return self.XsdLiteral(self)
  File "/build/PyXB-1.2.6/pyxb/binding/datatypes.py", line 757, in XsdLiteral
    value -= value.tzinfo.utcoffset(value)
  File "/build/PyXB-1.2.6/pyxb/binding/datatypes.py", line 685, in __new__
    raise TypeError('function takes %d arguments plus optional tzinfo (%d given)' % (len(cls._ValidFields), len(args)))
TypeError: function takes 3 arguments plus optional tzinfo (8 given)

======================================================================
ERROR: testXsdLiteral (test_date.Test_date)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_date", line 39, in testXsdLiteral
  File "/build/PyXB-1.2.6/pyxb/binding/basis.py", line 1010, in xsdLiteral
    return self.XsdLiteral(self)
  File "/build/PyXB-1.2.6/pyxb/binding/datatypes.py", line 761, in XsdLiteral
    value += datetime.timedelta(minutes=cls.__MinutesPerHalfDay)
  File "/build/PyXB-1.2.6/pyxb/binding/datatypes.py", line 685, in __new__
    raise TypeError('function takes %d arguments plus optional tzinfo (%d given)' % (len(cls._ValidFields), len(args)))
TypeError: function takes 3 arguments plus optional tzinfo (8 given)

======================================================================
FAIL: testNilConstruction (test_issue_0007.TestIssue0007)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_issue_0007", line 49, in testNilConstruction
AssertionError: b'<number xmlns:xsi="http://www.w3.org/2001/XMLSchem[24 chars]e"/>' != b'<number xsi:nil="true" xmlns:xsi="http://www.w3.or[24 chars]e"/>'

======================================================================
FAIL: testRoundTrip (test_trac_0058.TestTrac_0058)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_trac_0058", line 39, in testRoundTrip
AssertionError: b'<iopt xsi:nil="true" xmlns:xsi="http://www.w3.or[30 chars]opt>' != b'<iopt xmlns:xsi="http://www.w3.org/2001/XMLSchem[30 chars]opt>'

======================================================================
FAIL: testBasic (test_trac_0206.TestTrac0206)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_trac_0206", line 28, in testBasic
AssertionError: '2013-08-30 09:56:45+02:00' != '2013-08-30 07:56:45+00:00'
- 2013-08-30 09:56:45+02:00
?             ^        ^
+ 2013-08-30 07:56:45+00:00
?             ^        ^


======================================================================
FAIL: testDisable (test_trac_0057.TestTrac_0057)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_trac_0057", line 99, in testDisable
AssertionError: b'<ns1:ObsProject schemaVersion="8" revision="1.74" almatyp[125 chars]ect>' != b'<ns1:ObsProject almatype="APDM::ObsProject" revision="1.7[125 chars]ect>'

======================================================================
FAIL: testMetaConstructor (test_trac_0071.TestTrac_0071)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_trac_0071", line 119, in testMetaConstructor
AssertionError: b'<ns[83 chars]span end="+INF" start="-INF"><field><name>titl[75 chars]ent>' != b'<ns[83 chars]span start="-INF" end="+INF"><field><name>titl[75 chars]ent>'

======================================================================
FAIL: testMetaGoodBind (test_trac_0071.TestTrac_0071)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_trac_0071", line 166, in testMetaGoodBind
AssertionError: b'<ns[83 chars]span end="+INF" start="-INF"><field><name>titl[75 chars]ent>' != b'<ns[83 chars]span start="-INF" end="+INF"><field><name>titl[75 chars]ent>'

======================================================================
FAIL: testToXML (test_trac_0094.TestTrac_0094)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_trac_0094", line 55, in testToXML
AssertionError: b'<anything xsi:type="xs:string" xmlns:xs="http://www.[93 chars]ing>' != b'<anything xmlns:xs="http://www.w3.org/2001/XMLSchema[93 chars]ing>'

======================================================================
FAIL: testMetaConstructor (test_trac_0069.TestTrac_0069)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_trac_0069", line 93, in testMetaConstructor
AssertionError: b'<ns[83 chars]span start="-INF" end="+INF"><field><name>name[99 chars]ent>' != b'<ns[83 chars]span end="+INF" start="-INF"><field><name>name[99 chars]ent>'

======================================================================
FAIL: testEmptyWithAttr (test_ctd_attr.TestCTD)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_ctd_attr", line 112, in testEmptyWithAttr
AssertionError: b'<tca:emptyWithAttr language="french" capitalized="false" xml[18 chars]D"/>' != b'<tca:emptyWithAttr capitalized="false" language="french" xml[18 chars]D"/>'

======================================================================
FAIL: testComplex (test_xsi_nil.TestXSIType)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_xsi_nil", line 185, in testComplex
AssertionError: b'<complex xsi:nil="true" xmlns:xsi="http://www.w3.or[24 chars]e"/>' != b'<complex xmlns:xsi="http://www.w3.org/2001/XMLSchem[24 chars]e"/>'

======================================================================
FAIL: testComplexInternal (test_xsi_nil.TestXSIType)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_xsi_nil", line 173, in testComplexInternal
AssertionError: b'<complex xsi:nil="true" xmlns:xsi="http://www.w3.or[24 chars]e"/>' != b'<complex xmlns:xsi="http://www.w3.org/2001/XMLSchem[24 chars]e"/>'

@pabigot
Copy link
Owner

pabigot commented May 12, 2021

I also see that with Python 3.8.5. Presumably some internals have changed and PyXB's way of extending built-in types no longer works.

https://github.com/renalreg/PyXB-X may be your way forward; it explains this problem, though it doesn't fix it.

@mcepl
Copy link

mcepl commented Oct 25, 2021

#123 and #111 help a bit.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants