forked from pabigot/pyxb
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The original solution fixed the exception when bindings were generated, but the test passed only because of issue pabigot#78 which took four years more to discover. Revise the test to more accurately reflect what the original fix enabled (and demonstrate the error in issue pabigot#78). https://sourceforge.net/p/pyxb/tickets/193/
- Loading branch information
Showing
2 changed files
with
10 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,14 @@ | ||
import trac193 | ||
import pyxb.binding.datatypes as xs | ||
|
||
bdv = trac193.Money._UseForTag('Value').elementBinding().typeDefinition() | ||
assert bdv == xs.integer | ||
assert trac193.Money._UseForTag('Currency').elementBinding().typeDefinition() == xs.anySimpleType | ||
assert trac193.Money._UseForTag('Season').elementBinding().typeDefinition() == xs.anyType | ||
|
||
rdv = trac193.OpenDeliveries._UseForTag('Value').elementBinding().typeDefinition() | ||
assert rdv == xs.integer | ||
assert trac193.OpenDeliveries._UseForTag('Currency').elementBinding().typeDefinition() == xs.anySimpleType | ||
assert trac193.OpenDeliveries._UseForTag('Season').elementBinding().typeDefinition() == xs.anyType | ||
|
||
assert issubclass(rdv, bdv) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters