Closed karyon closed 7 years ago
test output is a bit noisy right now, i'd like to see this fixed... if you tell me what the problem is and how to fix it, i can try and make a PR.
I guess you need to check if the data is unicode with python3 before using from_encoding
or maybe using self.body (which is str with python2 and bytes with python3) instead of self.text. Don't know what's the best option
I would recommend using self.body
.
@bertjwregeer why? just so i know why i'm doing what i'm doing if i'm doing such a PR :)
I was confused, sorry, ignore my comment. self.text
is separate from response.text
. I thought it was a WebOb response object that was being used. response.text
does magic based upon the response.charset
.
I may have found a solution at #166 but I'm not really sure it will still fix #160
I also get this warning, is anyone working on fixing it? https://github.com/Pylons/webtest/pull/166 is open for months already
We were just waiting for your feedback. Can you confirm #166 fix the problem ?
I can confirm this fixes the warnings for me (python 3.5.2)
Ok thanks. Merged & released.
i get this warning:
/home/vagrant/django-webtest/.tox/py34-django110-std/lib/python3.4/site-packages/bs4/init.py:146: UserWarning: You provided Unicode markup but also provided a value for from_encoding. Your from_encoding will be ignored.``
i believe this is caused by https://github.com/Pylons/webtest/blob/9ca03a04927744fbea1b6a3fd209623981204bf1/webtest/forms.py#L404 (there may be other occurrences, haven't checked)
cheers :)