clips/pattern — pull request #46 by pjbull (2013-09-07 17:35:03+00:00)
Title: Update regexp in class search to work with multiple classes

1. change ^class$ -> \bclass\b so that we can match multiple classes
2. update multiple class search to work with unicode or str classes
3. add tests for these changes

All unit tests pass:
$ python -m unittest test_web.TestDOM
pattern.web.Node.Element
pattern.web.Node.Element.by_tag()
pattern.web.Node.Element.by_class()
pattern.web.Node.Element.by_id()
pattern.web.Node.Element.by_attribute()
.pattern.web.Node
pattern.web.DOM
.pattern.web.Node.traverse()
.pattern.web.Node.Element()
.
----------------------------------------------------------------------
Ran 4 tests in 0.019s

OK