inkex.tester.filters module#
Comparison filters for use with the ComparisonMixin.
Each filter should be initialised in the list of filters that are being used.
compare_filters = [
CompareNumericFuzzy(),
CompareOrderIndependentLines(option=yes),
]
- class inkex.tester.filters.Compare(**options)[source]#
Bases:
object
Comparison base class, this acts as a passthrough unless the filter staticmethod is overwritten.
- class inkex.tester.filters.CompareNumericFuzzy(**options)[source]#
Bases:
inkex.tester.filters.Compare
Turn all numbers into shorter standard formats
1.2345678 -> 1.2346 1.2300 -> 1.23, 50.0000 -> 50.0 50.0 -> 50
- class inkex.tester.filters.CompareWithoutIds(**options)[source]#
Bases:
inkex.tester.filters.Compare
Remove all ids from the svg
- class inkex.tester.filters.CompareWithPathSpace(**options)[source]#
Bases:
inkex.tester.filters.Compare
Make sure that path segment commands have spaces around them
- class inkex.tester.filters.CompareSize(**options)[source]#
Bases:
inkex.tester.filters.Compare
Compare the length of the contents instead of the contents
- class inkex.tester.filters.CompareOrderIndependentBytes(**options)[source]#
Bases:
inkex.tester.filters.Compare
Take all the bytes and sort them
- class inkex.tester.filters.CompareOrderIndependentLines(**options)[source]#
Bases:
inkex.tester.filters.Compare
Take all the lines and sort them
- class inkex.tester.filters.CompareOrderIndependentStyle(**options)[source]#
Bases:
inkex.tester.filters.Compare
Take all styles and sort the results
- class inkex.tester.filters.CompareOrderIndependentStyleAndPath(**options)[source]#
Bases:
inkex.tester.filters.Compare
Take all styles and paths and sort them both
- class inkex.tester.filters.CompareOrderIndependentTags(**options)[source]#
Bases:
inkex.tester.filters.Compare
Sorts all the XML tags
- class inkex.tester.filters.CompareReplacement(*replacements)[source]#
Bases:
inkex.tester.filters.Compare
Replace pieces to make output more comparable
New in version 1.1.
- class inkex.tester.filters.WindowsTextCompat[source]#
Bases:
inkex.tester.filters.CompareReplacement
Normalize newlines so tests comparing plain text work
New in version 1.2.