pyjnius/tests/test_implementation.py

22 lines
647 B
Python
Raw Normal View History

# -*- coding: utf-8 -*-
import unittest
from jnius.reflect import autoclass
class ImplementationTest(unittest.TestCase):
def test_println(self):
# System.out.println implies recursive lookup, and j_self assignation.
# It was crashing during the implementation :/
System = autoclass('java.lang.System')
System.out.println('')
def test_printf(self):
System = autoclass('java.lang.System')
System.out.printf('hi\n')
System.out.printf('hi %s %s\n', 'jnius', 'other string')
2013-04-17 15:03:20 +00:00
def test_unicode(self):
System = autoclass('java.lang.System')
System.out.printf(u'é')