Commit Graph

56 Commits

Author SHA1 Message Date
Mathieu Virbel ac2324d96e fixes bytearray tests again (python3) 2015-12-10 14:14:48 +01:00
Mathieu Virbel c8ede02ae0 fix bytearray test, and check more input/output signed/unsigned with unittests 2015-12-10 13:20:39 +01:00
Mathieu Virbel f11f88e2df Merge branch 'master' of github.com:kivy/pyjnius
Conflicts:
	jnius/jnius_conversion.pxi
2015-12-10 00:56:06 +01:00
Mathieu Virbel 5bb7e6cfdb supports bytearray as argument for byte[]. Useful for socket/bluetooth reading (no need to read one by one) 2015-12-10 00:55:08 +01:00
Benson Margulies da68d701f1 Removr all use of 'future'. 2015-11-04 17:30:24 -05:00
Benson Margulies 3968f3af17 Merge branch 'master' of github.com:kivy/pyjnius into python-34
Conflicts:
	.travis.yml
	Makefile
	setup.py
	tests/test_proxy.py
2015-11-03 07:51:45 -05:00
dessant fc77dd624d Merge pull request #133 from chrisjrn/signatures
API for human-readable method signatures
2015-11-03 14:00:35 +02:00
Benson Margulies e1070965cc Support Python 3.4
see if we can't make travis happy.
2015-05-03 11:24:27 -04:00
Benson Margulies 734e54789b cleanup the build process. Use ant, put the java code in a proper java root. 2015-05-03 11:24:11 -04:00
Benson Margulies 4f8c918ad4 Fix issue #162 by making 'make tests' pass. 2015-05-03 11:24:11 -04:00
Benson Margulies 0ab1468bc5 Fix issue #162 by making 'make tests' pass. 2015-04-30 19:36:56 -04:00
Mathieu Virbel 6208c609eb Merge pull request #150 from msmolens/set-fields
Enable setting primitive data type fields on Java classes
2015-03-12 16:22:45 +01:00
Mathieu Virbel 9425a2cc31 Merge pull request #115 from Lenbok/issue-96-exception-handling
Issue 96 improved exception handling
2015-03-12 16:20:17 +01:00
Max Smolens 18d506911e Enable setting primitive data type fields on Java classes 2015-02-25 22:59:28 -05:00
Mathieu Virbel 614e43626a add few tests about bytearray filling. 2015-02-07 19:31:04 +01:00
Mathieu Virbel d9cdbb7288 add a test with signed char to ensure it still working 2015-02-06 18:34:50 +01:00
Christopher Neugebauer 696924d54b More tests for signatures! 2014-09-17 18:07:41 +10:00
Christopher Neugebauer 2f838e2fac Adds tests for raw signature creation 2014-09-17 17:56:30 +10:00
Christopher Neugebauer 7a17a9cc3d Renames “java_signature” to “with_signature”; adds “signature” method to public API 2014-09-17 17:30:37 +10:00
Christopher Neugebauer 176dc70919 First pass at a nicer signatures API with tests 2014-09-16 20:17:13 +10:00
Lenbok d93c911d9e Add improved exception handling:
- Disable calling ExceptionDescribe, as this pollutes stderr, making it harder
to implement clean exception handling. JNI documentation describes it as being for
debugging purposes.

- Extract separate fields for the exception class name, exception message, and
exception stack trace, and add these as attributes to JavaException. Calling
code can now decide for itself whether and how to present this information.
2014-05-19 10:22:36 +12:00
Len Trigg 6328de8142 Incorporate patch from #96 and a unit test 2014-05-16 12:12:12 +12:00
James Laird 0279d2e870 Add support for multidimensional arrays 2014-05-05 17:29:33 +10:00
Mathieu Virbel d5d2926190 raise an exception if the signature have invalid character + fix pyjnius documentation about array declaration in signature 2014-01-21 09:48:48 +01:00
Michał Zieliński 51889323a3 Fix field dereference when multiple instances of a class exist. Fixes #77 2013-09-16 22:04:56 +02:00
Mathieu Virbel 693275fe48 new ByteArray native class, used to transport [B in python, instead of using Python list + integer.
ByteArray have .tostring() + .tolist(), and support slices / item lookup / size, but everything is readonly.
2013-09-11 17:18:49 +02:00
Mathieu Virbel af824144cc fixes for convert_jobject_to_python to correctly handle [B as parameters, as well as "Ljava/lang/Object;" that can be converted into "[Ljava/lang/String;" 2013-09-10 11:05:13 +02:00
Mathieu Virbel 481b3e5d30 basic support for output args. works only in the original type allow slice assignment. We gently ignore TypeError if the assignation didnt work. closes #58 2013-07-02 09:43:39 +02:00
Mathieu Virbel 2c5a14dae2 fix encoding issues in test_implementation.py 2013-06-24 09:36:31 +02:00
Mathieu Virbel 68165ed04b add tests for testing Python string -> [B, using ByteBuffer.wrap(byte[]) 2013-06-24 09:24:37 +02:00
tshirtman 7baebbb465 test unicode handling 2013-04-17 17:03:20 +02:00
Mathieu Virbel 2a95adc674 cleanup proxy code 2013-03-13 21:38:10 +01:00
Mathieu Virbel 5fa7030778 fix proxy tests, it works! 2013-03-13 19:13:08 +01:00
tshirtman 9dd20611fe small fixes 2013-01-17 02:33:50 +01:00
tshirtman f840d9a253 doing a call to ListIterator() before fix the issue XXX find why
add get/set to TestImplemIterator so it does the shuffle correctly
2013-01-17 02:27:34 +01:00
tshirtman e10ed056bb move testImpl to tests/test_proxy.py and move NativeInvocationHandler
adapt jnius_jvm_desktop to have access to java jnius package
2013-01-03 12:57:46 +01:00
Amirouche Boubekki fcfb1e64a8 added support for Python class as parameter of java methods that takes Java Class object as parameter 2012-10-14 23:00:19 +02:00
Amirouche Boubekki 99a4c3be71 added some tests for Interface, enums and nested enums in Interface 2012-10-12 16:51:40 +02:00
Amirouche Boubekki c216057647 convert arrays returned as Java Object to python list 2012-10-01 02:20:58 +02:00
Amirouche Boubekki 4bcf4c5e16 proper indentation of according to emacs :> 2012-10-01 01:34:31 +02:00
Amirouche Boubekki 4a6945accd convert list of integer, float and long to their equivalent Java Array object 2012-10-01 01:30:51 +02:00
Amirouche Boubekki 20b4bd5d62 allow to use python list and tuple as Object params 2012-10-01 01:21:24 +02:00
Amirouche Boubekki b8ee0f8ab5 fix method resolution when they are varargs 2012-09-30 22:39:38 +02:00
gabriel.pettier 858bff6e25 varargs works!
at least for printf, and probably for other methods accepting Strings

need more tests cases!
2012-08-26 17:52:19 +02:00
gabriel.pettier 708b2d075f Doesn't break the tests anymore, add test for varargs, not passing (yet) 2012-08-26 15:53:11 +02:00
Mathieu Virbel 77f2928e0b fixes for subclasses. closes #3 2012-08-20 10:34:14 +02:00
Mathieu Virbel 60ee14ed6f add the previous tests from python-for-android/javawrapper branch.
+ fix findclass (need cleaning)
+ fix array return with chars
+ export reflect module by default (it's already used in jnius so..)
2012-08-18 12:59:15 +02:00
Mathieu Virbel bb0923d77d fix System.out.println('hello') crash due to a race condition: the instancatied JavaClass for "out" was deallocated before the __call__ of the println. >_< 2012-08-18 04:14:53 +02:00
Mathieu Virbel 774fc295e9 add cast(classname, obj) method to be able to use an instance from another class def 2012-08-16 00:16:17 +02:00
Mathieu Virbel 77139529ad add support for multiple signatures on constructors and methods. 2012-08-15 19:16:39 +02:00