mirror of
https://github.com/DarrenOfficial/dpaste.git
synced 2024-11-15 08:02:54 +11:00
Added unicode samples to tests. Enforce Python 3
This commit is contained in:
parent
69cd74468c
commit
f48b81df53
3 changed files with 14 additions and 14 deletions
|
@ -14,8 +14,8 @@ class HighlightAPITestCase(TestCase):
|
|||
"""
|
||||
PLAIN_CODE is not run through Pygments, test it separately.
|
||||
"""
|
||||
input = 'var'
|
||||
expected = '<span class="plain">var</span>'
|
||||
input = 'vär'
|
||||
expected = '<span class="plain">vär</span>'
|
||||
value = PlainCodeHighlighter().highlight(input)
|
||||
self.assertEqual(value, expected)
|
||||
|
||||
|
@ -23,8 +23,8 @@ class HighlightAPITestCase(TestCase):
|
|||
"""
|
||||
Whitespace on the first line is retained.
|
||||
"""
|
||||
input = ' var=1'
|
||||
expected = '<span class="plain"> var=1</span>'
|
||||
input = ' vär=1'
|
||||
expected = '<span class="plain"> vär=1</span>'
|
||||
value = PlainCodeHighlighter().highlight(input)
|
||||
self.assertEqual(value, expected)
|
||||
|
||||
|
@ -32,15 +32,15 @@ class HighlightAPITestCase(TestCase):
|
|||
"""
|
||||
Whitespace on the first line is retained, also on subsequent lines.
|
||||
"""
|
||||
input = (' var=1\n'
|
||||
' var=2\n'
|
||||
' var=3\n'
|
||||
' var=4')
|
||||
input = (' vär=1\n'
|
||||
' vär=2\n'
|
||||
' vär=3\n'
|
||||
' vär=4')
|
||||
expected = (
|
||||
'<span class="plain"> var=1</span>\n'
|
||||
'<span class="plain"> var=2</span>\n'
|
||||
'<span class="plain"> var=3</span>\n'
|
||||
'<span class="plain"> var=4</span>')
|
||||
'<span class="plain"> vär=1</span>\n'
|
||||
'<span class="plain"> vär=2</span>\n'
|
||||
'<span class="plain"> vär=3</span>\n'
|
||||
'<span class="plain"> vär=4</span>')
|
||||
value = PlainCodeHighlighter().highlight(input)
|
||||
self.assertEqual(value, expected)
|
||||
|
||||
|
|
1
setup.py
1
setup.py
|
@ -26,6 +26,7 @@ setup(
|
|||
'Programming Language :: Python :: 3',
|
||||
'Framework :: Django',
|
||||
],
|
||||
python_requires='>=3.4',
|
||||
packages=find_packages(),
|
||||
package_data={
|
||||
'dpaste': ['static/*.*', 'templates/*.*'],
|
||||
|
|
3
tox.ini
3
tox.ini
|
@ -3,8 +3,7 @@ toxworkdir=/tmp/tox/dpaste
|
|||
skip_missing_interpreters=True
|
||||
envlist=
|
||||
coverage_setup
|
||||
py{34,35,36}-django-{111}
|
||||
py{34,35,36}-django-{20}
|
||||
py{34,35,36}-django-{111,20}
|
||||
coverage_report
|
||||
|
||||
[testenv]
|
||||
|
|
Loading…
Reference in a new issue