mirror of
https://github.com/Tygs/0bin.git
synced 2023-08-10 21:13:00 +03:00
Porting zerobin to python 3
This commit is contained in:
19
libs/cherrypy/test/test_compat.py
Normal file
19
libs/cherrypy/test/test_compat.py
Normal file
@ -0,0 +1,19 @@
|
||||
import unittest
|
||||
|
||||
import nose
|
||||
|
||||
from cherrypy import _cpcompat as compat
|
||||
|
||||
|
||||
class StringTester(unittest.TestCase):
|
||||
|
||||
def test_ntob_non_native(self):
|
||||
"""
|
||||
ntob should raise an Exception on unicode.
|
||||
(Python 2 only)
|
||||
|
||||
See #1132 for discussion.
|
||||
"""
|
||||
if compat.py3k:
|
||||
raise nose.SkipTest("Only useful on Python 2")
|
||||
self.assertRaises(Exception, compat.ntob, unicode('fight'))
|
Reference in New Issue
Block a user