mintchaos / typogrify

A set of Django template filters to make caring about typography on the web a bit easier.
http://static.mintchaos.com/projects/typogrify/
Other
167 stars 29 forks source link

pytest warnings #57

Open kloczek opened 3 years ago

kloczek commented 3 years ago

Looks like typogrify is not fullly pytest 4.0 ready. Just normal build, install and test cycle:

typogrify/filters.py ....... [ 58%] typogrify/packages/titlecase/tests.py ....x [100%]

============================================================================= warnings summary ============================================================================= typogrify/filters.py:46 /home/tkloczko/rpmbuild/BUILD/typogrify-2.0.7/typogrify/filters.py:46: DeprecationWarning: invalid escape sequence \s tag = match.group(1) if match.group(1) != '' else '[^\s.#<>]+'

typogrify/filters.py:140 /home/tkloczko/rpmbuild/BUILD/typogrify-2.0.7/typogrify/filters.py:140: DeprecationWarning: invalid escape sequence \w tag_pattern = '</?\w+((\s+\w+(\s=\s(?:".?"|\'.?\'|[^\'">\s]+))?)+\s|\s)/?>'

typogrify/packages/titlecase/init.py:17 /home/tkloczko/rpmbuild/BUILD/typogrify-2.0.7/typogrify/packages/titlecase/init.py:17: DeprecationWarning: invalid escape sequence . SMALL = 'a|an|and|as|at|but|by|en|for|if|in|of|on|or|the|to|v.?|via|vs.?'

typogrify/packages/titlecase/init.py:17 /home/tkloczko/rpmbuild/BUILD/typogrify-2.0.7/typogrify/packages/titlecase/../titlecase/init.py:17: DeprecationWarning: invalid escape sequence . SMALL = 'a|an|and|as|at|but|by|en|for|if|in|of|on|or|the|to|v.?|via|vs.?'

typogrify/packages/titlecase/tests.py:164 typogrify/packages/titlecase/tests.py:164: PytestCollectionWarning: yield tests were removed in pytest 4.0 - test_input_output will be ignored def test_input_output():

-- Docs: https://docs.pytest.org/en/stable/warnings.html ========================================================================= short test summary info ========================================================================== XFAIL typogrify/packages/titlecase/tests.py::test_input_output reason: [NOTRUN] yield tests were removed in pytest 4.0 - test_input_output will be ignored ================================================================ 11 passed, 1 xfailed, 5 warnings in 0.35s =================================================================


BTW: do you have any plans to make new release?
justinmayer commented 3 years ago

Hi Tomasz. I think the concept of a "normal build, install, and test cycle" is mutable, and in this case the steps for setting up a Typogrify development environment (including how to run the tests) are clearly proscribed in the README. When following those steps, I cannot replicate the problem described here.

As far as issuing a new release, nearly all the recent changes relate to tooling/infrastructure and don't impact Typogrify's behavior. That said, I will do my best to issue a new release as soon as I can.

kloczek commented 3 years ago

I'm not developing any module. I'm packaging that kinsd of resourses so fom that point of view it is indeed when such process needs to be executed from non-root account but in final form needs to be installed in python tree.

Whatever is in that file has nothing to do with those pytest warnings.

kloczek commented 3 years ago

Just in case .. in top part of the pytest output you have all necessary details of the build env. If something is missing please let me lkow I'll be glad to provide all necessary details.

justinmayer commented 3 years ago

Be that as it may, the tests pass just fine for me via this project's canonical instructions, and I don't have time to dig into this issue any further. Would you propose a pull request to address what you perceive as areas in need of improvement?

kloczek commented 3 years ago

Be that as it may, the tests pass just fine for me via this project's canonical instructions, and I don't have time to dig into this issue any further. Would you propose a pull request to address what you perceive as areas in need of improvement?

I fully understand that. I fully understand as well that if I'll run pytest in exactly the same set of modules I would be not able to see probably of those warnings.

Just please have look one more time on that output to see list of pytest extensions used by pytest in that test. Some of those extensions are about performing code scanning and other sanity checks. So instead bouncing me back to your procedure please have look on that output as as you know you code the best jus please asses is it here anything which may closer look or not. I cannot provide PR. I'm only messenger and I'm only showing you what I see in devel env where I have now installed +450 python modules (all up-to-date) in which not to many people on this planet usually is running your code. If you are not interested results of running in such env please let me know and I promise I will never bother you results of such tests. If you are thinking that is is nothing to do/investigate here just please close that ticket.

If you have no time now maybe later .. no rush. This is just a warning and probably it is nothing critical.

kloczek commented 2 years ago

Any update about his issue? 😃