openpreserve / jpylyzer

JP2 (JPEG 2000 Part 1) validator and properties extractor. Jpylyzer was specifically created to check that a JP2 file really conforms to the format's specifications. Additionally jpylyzer is able to extract technical characteristics.
http://jpylyzer.openpreservation.org/
Other
69 stars 28 forks source link

Setup PyUnit tests for Jpylyzer #110

Closed carlwilson closed 4 years ago

carlwilson commented 5 years ago

Dev Effort

2D

Description

Currently there are no unit tests run regularly across the Jpylyzer code base. This issue is a marker to put pylint unit tests in place and ensure that they're run on Travis. It's not an effort to provide test coverage. Initially the work would be to put in place the pyunit tasks, create a couple of small example tests and add them to the Travis build script. It's not an effort to provide extensive test coverage for Jpylyzer but enables others to do this. I'd also work with @bitsgalore to automate some testing against the existing corpus.

carlwilson commented 4 years ago

PR #141 set up pyunit and Travis testing, while #143 adds some example unit tests for some methods. It makes it possible to add tests easily. Consider closed when v2 is merged to master.

bitsgalore commented 4 years ago

@carlwilson great, I just had a quick look on if/how we could add additional tests in the future that use the jpylyzer test corpus, so I came up with this simple test that checks the validation outcome of one JP2:

https://github.com/openpreserve/jpylyzer/commit/3c648431a8b2cdb39993fd0df3e545dcbccf0378

This works on my local file system, but to make this work within the CI workflow this would require an additional step that involves cloning into jpylyzer-test-files and then use the downloaded files from there. Not entirely sure how/where to do this in the Travis yml file, and at which location on the fs the files are then accessible. Maybe you have any ideas?

Once that is in place I can think of more tests that use the test corpus (probably won't have time for trhis befiore the release date, but it would be useful to have the basic mechanisms in place by then).

carlwilson commented 4 years ago

Hi @bitsgalore I'll add the necessary setup steps to the Travis file some time today.

bitsgalore commented 4 years ago

Framework for testing now in place; implementing actual tests to be done for an upcoming (2.1?) release. Meanwhile leaving this issue open.