Commit Graph

10 Commits

Author SHA1 Message Date
Cosmos Nicolaou ac88620b22
_examples,bind: add a test for types.Named
This CL adds a test for #220.
2020-03-27 18:58:43 +01:00
Randall C. O'Reilly e381500a36 verified building on py2 and most tests work except for a few minor diffs in output -- calling it good enough for now. 2019-08-24 10:31:16 +02:00
Randall C. O'Reilly 8d98f0953a all tests now passing except maps.. also need to test py2 2019-08-24 10:31:16 +02:00
Sebastien Binet fbb477f2ae tests: fix exit code 2019-01-16 16:18:59 +01:00
Ondřej Herman cbb791395e gopy/bind: pass Go strings to Python as Unicode objects 2019-01-16 09:40:56 +01:00
Ondřej Herman b43954fc33 gopy/bind: enable subclassing of generated CPython objects 2019-01-15 18:02:29 +01:00
Sebastien Binet 616ace6c34 gopy,_examples: use py2/py3 compatible syntax where possible
This CL makes sure we are more or less ready for python3.

- import __future__.print_function so python2 can use the same
  print(foo, bar) syntax than python3
- use the python3 syntax for catching exceptions
2017-08-04 18:07:11 +02:00
Kyle Ellrott 76adcee3a5 gopy: casting struct arguments to method calls
This is a first attempt to properly cast struct arguments to method calls.

The test example would be:
  func (S) MethodTest(S) {}
  func FuncTest(S) {}
from the structs.go example.

Change-Id: I568299508c6f62975792acf9de2d6d2f7cc4271d
2015-09-08 08:47:38 +02:00
Sebastien Binet 55c408dc44 bind: handling of private fields in struct.tp_init
Previously, the tp_init function being generated for a struct would try to fill
private fields from the args passed to __init__.
This obviously breaks Go's encapsulation mechanism.

Only allow public fields to be initialized from __init__.
Add a test.

Fixes #52.
2015-08-31 18:40:47 +02:00
Sebastien Binet 7852de8d4b bind: test empty structs
Change-Id: I9d30488e9dbc6244fa891a6a43725db775fe9ab1
2015-08-11 19:04:15 +02:00