pyquery icon indicating copy to clipboard operation
pyquery copied to clipboard

Improve CSS query with getter and setter, keep order of css entries

Open doctormo opened this issue 10 years ago • 3 comments

I needed to do some svg work and svg has /a lot/ of embedded css. So I needed to upgrade pyquery to support the full jquery css command. I've made it work just like the js version with regards to how it returns getter values as well as getting lists and setting.

I also managed to reduce the code duplication between setting one item and setting a dictionary.

Tests to cover the function included.

doctormo avatar Apr 20 '15 18:04 doctormo

That's a good point. But your patch break all the tests

gawel avatar Jun 10 '15 18:06 gawel

Does the module target python 2.6, because OrderedDict is >2.7 only. I think the rst tests are failing because of the added semi-colon at the end. And the local tests (setup.py test has no tests in it) tests.py all pass. Which means this project has multiple testing frameworks in place. How are these documentation tests run locally?

doctormo avatar Jun 10 '15 19:06 doctormo

It use tox. Like most projects. Just pip install tox and run tox. I think python2.6 support can be dropped at this point. Just remove it from tox.ini / classifiers

gawel avatar Jun 10 '15 19:06 gawel