pattern3 / pattern

Goal: make Pattern compatible with Python 3.
http://www.clips.ua.ac.be/pages/pattern
BSD 3-Clause "New" or "Revised" License
59 stars 35 forks source link

Test examples #7

Closed hayd closed 9 years ago

hayd commented 9 years ago

Adds examples as tests.

I can't get examples/06-graph/07-graphml.py working on python 2.6 (nor was in in clips/pattern/master ! nor were a few others I fixed up). The reason is that we use ElementTree.register_namespace which is not available in python 2.6 (as far as I can tell). That is, it looks to me like it's proper <=2.6 bug (in master).

Note: as such this fails travis... we should address (or else skip this example, I already skip a few due to HTTPErrors, but this is a proper error) before merging. And probably add a unit test for whatever it is that's hitting this.


Any ideas? Maybe it's this http://stackoverflow.com/a/8116716/1240268, not sure.

If it's non-obvious I'm tempted to wrap this part of graph/__init__ in a NotImplementedError and simply skip the 2.6 version of this test (this is the easiest "solution"). Edit: I went ahead and did that and tests now pass.