Commit Graph

18 Commits

Author SHA1 Message Date
Davide Brunato 1a1ec82586 Merge branch 'develop' for updating to release v1.0.16 2019-11-18 10:10:57 +01:00
Davide Brunato 6994da5173 Code refactoring for tests
- Rename XMLSchemaTestCase to XsdValidatorTestCase
  - Add casepath() helper
  - Modify TestResources: derive from TestCase and use casepath()
  - Split test_package.py into 3 modules (added test_etree.py and
    test_memory.py)
  - Update .tox with new environments 'package' and 'memory'
  - Replace test_package with test_etree into test_all.py script
  - Modify XsdValidatorTestCase.check_schema() to use xs prefix for
    XSD namespace and no namespace as targetNamespace for a fast
    reuse of common and user sample cases
2019-06-20 15:35:04 +02:00
Davide Brunato d21ac11dde Fix default values decoding as reported by issue #108
- Default and fixed values are inserted during the decode or
    encode process
  - Update tox.ini to include coverage and flake8 to environments
    and an optional environment to build source and wheel packages
2019-05-31 09:29:41 +02:00
Davide Brunato 953924e35a Update Unicode categories module
- More speed on creating categories from unicodedata.category API
  - JSON serialized Unicode categories now include major categories
  - Delete unicode_categories.json from repo (it will be created by
    install command)
2019-03-12 07:08:10 +01:00
Davide Brunato 7e86fb33b2 Rename xmlschema/tests/cases/ to xmlschema/tests/test_cases/ 2019-02-02 10:01:12 +01:00
Davide Brunato 37d76b1aed Add XsdModelVisitor class for helping on group validation 2018-08-18 08:29:10 +02:00
Davide Brunato 8c3d1043a9 Enable testing with tox, add tox to requirements-dev.txt 2018-04-03 23:23:59 +02:00
Davide Brunato 14c4fbb61d Add elementpath to package requirements
- Changed XPath selectors for XSD key/unique/keyref constraints
  - Removed old code from xpath.py (only a class and an helper function
    have left in)
2018-03-27 11:02:14 +02:00
Davide Brunato b54167dcd6 Fixed issue #26; issue related tests renaming. 2017-12-13 19:22:54 +01:00
Davide Brunato 7e91aa1f1d Revising tests 2017-11-05 08:38:14 +01:00
Davide Brunato 17b291783e Added a module for identity constraints:
* new file: xmlschema/components/constraints.py
  * parsed xs:unique, xs:key and xs:keyref and subcomponents
  * added '|' as reference delimiter in xpath.py tokenizer
  * improved XPathParser to check operator: the base class
    admits all operators, subclasses can restricts overriding
    NOT_ALLOWED_OPERATORS class attribute.
2017-09-12 18:16:41 +02:00
Davide Brunato 45dba5ab46 Removed XMLSchemaComponentError exception:
* Now XMLSchemaParseError is the only exception used when
    an error is found when parsing a schema
  * The parsing errors are collected in schema.errors list
    instead of an immediate raising and stop of the parser
2017-05-26 14:22:44 +02:00
Davide Brunato d090df9fa3 Improved XPath parser and testing:
* Added test files for decoder (examples/decoder/*);
  * Added a variant of test schema vehicles.xsd (examples/vehicles/vehicles2.xsd);
  * Added XPath filter predicates;
  * Fixed empty dict decoding to None (issue #4).
2017-05-15 08:06:32 +02:00
Davide Brunato 09aa7073df Modifications to xmlschema/resources.py:
- open_resource(): fixed Windows compatibility for paths to uri conversion
  - load_xml_resource(): now the source argument can be also an ElementTree
2017-04-13 15:56:32 +02:00
Davide Brunato 7be2aede6a Updated .gitignore and extra-schemas. 2016-10-26 08:24:49 +02:00
Davide Brunato 8a58c2bc01 Created a first version of manual using Sphinx. 2016-10-19 16:20:32 +02:00
Davide Brunato 92bef12a1f Move tests to source subdirectory and fix PyPI publication. 2016-10-14 17:16:46 +02:00
Davide Brunato 313f41adbe Initial commit
Changes to be committed:
	new file:   .gitignore
	new file:   LICENSE
	new file:   README.rst
	new file:   setup.py
	new file:   tests/__init__.py
	new file:   tests/_test_common.py
	new file:   tests/examples/bikes.xsd
	new file:   tests/examples/cars.xsd
	new file:   tests/examples/recursive-groups.xsd
	new file:   tests/examples/testfiles
	new file:   tests/examples/types.xsd
	new file:   tests/examples/vehicles-1_error.xml
	new file:   tests/examples/vehicles-2_errors.xml
	new file:   tests/examples/vehicles-3_errors.xml
	new file:   tests/examples/vehicles-max.xsd
	new file:   tests/examples/vehicles.xml
	new file:   tests/examples/vehicles.xsd
	new file:   tests/test_decoding.py
	new file:   tests/test_schemas.py
	new file:   tests/test_validation.py
	new file:   xmlschema/__init__.py
	new file:   xmlschema/builtins.py
	new file:   xmlschema/core.py
	new file:   xmlschema/etree.py
	new file:   xmlschema/factories.py
	new file:   xmlschema/parse.py
	new file:   xmlschema/qnames.py
	new file:   xmlschema/resources.py
	new file:   xmlschema/schema.py
	new file:   xmlschema/schemas/HFP/XMLSchema-hasFacetAndProperty.xsd
	new file:   xmlschema/schemas/XML/xml.xsd
	new file:   xmlschema/schemas/XSD_1.0/XMLSchema.xsd
	new file:   xmlschema/schemas/XSD_1.0/datatypes.xsd
	new file:   xmlschema/schemas/XSD_1.1/XMLSchema.xsd
	new file:   xmlschema/schemas/XSD_1.1/datatypes.xsd
	new file:   xmlschema/schemas/XSI/XMLSchema-instance.xsd
	new file:   xmlschema/schemas/XSLT/schema-for-xslt20.xsd
	new file:   xmlschema/utils.py
	new file:   xmlschema/validators.py
2016-10-14 13:48:19 +02:00