Package cherrypy :: Package test :: Module test_compat
[hide private]
[frames] | no frames]

Source Code for Module cherrypy.test.test_compat

 1  import unittest 
 2   
 3  import nose 
 4   
 5  from cherrypy import _cpcompat as compat 
 6   
 7   
8 -class StringTester(unittest.TestCase):
9
10 - def test_ntob_non_native(self):
11 """ 12 ntob should raise an Exception on unicode. 13 (Python 2 only) 14 15 See #1132 for discussion. 16 """ 17 if compat.py3k: 18 raise nose.SkipTest("Only useful on Python 2") 19 self.assertRaises(Exception, compat.ntob, unicode('fight'))
20