This adds regression testing to the module, with some other goodies along the way. I added a setup.py script to facilitate this. Tests can be run directly with nosetests or python setup.py test, and you can test both Python 2 and Python 3 simultaneously by running tox. Furthermore, I added configuration to run the test suite on Travis CI. (also on multiple Python versions) See results here.
Along the way, I discovered that the example.py script didn't work correctly on Python 2. Due to encoding issues, the first text filter wasn't matching em dashes or en dashes. I changed a string constant to be a unicode constant, and it works now.
pdfrw recently released a new package, version 0.3, and that is currently even with master in the repository, so I switched the dependency to use the PyPI version. This should be better for both local caching and stability against upstream updates.
This adds regression testing to the module, with some other goodies along the way. I added a setup.py script to facilitate this. Tests can be run directly with
nosetests
orpython setup.py test
, and you can test both Python 2 and Python 3 simultaneously by runningtox
. Furthermore, I added configuration to run the test suite on Travis CI. (also on multiple Python versions) See results here.Along the way, I discovered that the example.py script didn't work correctly on Python 2. Due to encoding issues, the first text filter wasn't matching em dashes or en dashes. I changed a string constant to be a unicode constant, and it works now.
pdfrw
recently released a new package, version 0.3, and that is currently even withmaster
in the repository, so I switched the dependency to use the PyPI version. This should be better for both local caching and stability against upstream updates.