Files
edx-platform/lms/djangoapps/discussion/django_comment_client/tests/unicode.py
edX requirements bot f33f12bbea BOM-2358 : Pyupgrade in dashboard, debug, discussion apps (#26529)
* Python code cleanup by the cleanup-python-code Jenkins job.

This pull request was generated by the cleanup-python-code Jenkins job, which ran
```
cd lms/djangoapps/dashboard; find . -type f -name '*.py' | while read fname; do sed -i 's/  # lint-amnesty, pylint: disable=super-with-arguments//; s/  # lint-amnesty, pylint: disable=import-error, wrong-import-order//; s/  # lint-amnesty, pylint: disable=wrong-import-order//' "$fname"; done; find . -type f -name '*.py' | while read fname; do pyupgrade --exit-zero-even-if-changed --py3-plus --py36-plus --py38-plus "$fname"; done; isort --recursive .
```

The following packages were installed:
`pyupgrade,isort`

* feedback done

Co-authored-by: Zulqarnain <muhammad.zulqarnain@arbisoft.com>
2021-02-22 15:42:21 +05:00

24 lines
988 B
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# lint-amnesty, pylint: disable=missing-module-docstring
class UnicodeTestMixin: # lint-amnesty, pylint: disable=missing-class-docstring
def test_ascii(self):
self._test_unicode_data("This post contains ASCII.")
def test_latin_1(self):
self._test_unicode_data("Thís pøst çòñtáins Lätin-1 tæxt")
def test_CJK(self):
self._test_unicode_data("イんノ丂 アo丂イ co刀イムノ刀丂 cフズ")
def test_non_BMP(self):
self._test_unicode_data("𝕋𝕙𝕚𝕤 𝕡𝕠𝕤𝕥 𝕔𝕠𝕟𝕥𝕒𝕚𝕟𝕤 𝕔𝕙𝕒𝕣𝕒𝕔𝕥𝕖𝕣𝕤 𝕠𝕦𝕥𝕤𝕚𝕕𝕖 𝕥𝕙𝕖 𝔹𝕄")
def test_special_chars(self):
self._test_unicode_data(
"\" This , post > contains < delimiter ] and [ other } special { characters ; that & may ' break things"
)
def test_string_interp(self):
self._test_unicode_data("This post contains %s string interpolation #{syntax}")