Commit graph

123 commits

Author SHA1 Message Date
Jacob Alexander
78776de647
Adding examples as pytest tests
- This way they will be included in CI checks
- Decreased the delay time in the thread-like examples to speed up tests
(probably could decrease the time some more)
- Added an async version of the calculator test
- Forcing python3 support for example scripts
2019-09-27 14:40:54 -07:00
Jacob Alexander
75e0e7e84c
Fixed or waved all pytest failures and errors
- Needed to include cleanup_global_schema_parser() to handle duplicate
imports of the same .capnp file
  * Duplicate IDs are a problem as pytest does not fully cleanup between
  tests
- Marked some tests as xfail as I'm not sure the test is supposed to
work anymore with recent versions of capnproto
2019-09-27 01:12:54 -07:00
Jacob Alexander
b3021e4f6b
Fixing flake8 warnings and errors
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics --exclude benchmark

Excluding the benchmark directory (due to protobuf generated files)
Also removing some Python2 specific code
2019-09-27 00:15:13 -07:00
Jason Paryani
da8f8869fc Add some edge case tests for read_multiple_bytes 2019-01-31 01:02:11 -08:00
Trevor Highland
2a66c2f6bf Skip tests based on python version. 2019-01-28 18:09:17 +00:00
Trevor Highland
ed6e39ded0 Update test to support 3.5 2019-01-28 17:39:10 +00:00
Trevor Highland
dbd23721a9 Support long messages in read_multiple_bytes. 2019-01-28 17:04:34 +00:00
Ivan Smirnov
8fd6cc6f66 Add a test for generic from_bytes() 2017-11-28 00:18:20 +00:00
Jason Paryani
51c4bb1bb6 Add tuple setting test 2017-04-09 20:57:33 -07:00
Jason Paryani
e4db5e6d66 Add exception raising tests for traversal_limit_in_words 2017-04-09 17:38:14 -07:00
Jason Paryani
3f04134e72 Merge pull request #139 from tundra/develop
Pass options correctly through from_bytes to FlatArrayMessageReader
2017-04-09 17:11:20 -07:00
Christian Plesner Hansen
34385afbbd Pass options correctly through from_bytes to FlatArrayMessageReader 2017-02-15 12:02:41 +01:00
Alex Silverstein
0382beb26a Let TwoParty Clients and Servers take ReaderOptions 2017-01-22 02:25:58 +00:00
Madeleine Thompson
93ea35e558 make enums hashable 2016-12-05 22:43:09 -05:00
Constantine Vetoshev
5a63dacf14 Disable segment serialization test on PyPy (for now). 2016-06-24 13:28:35 -07:00
Constantine Vetoshev
73d6c5dc10 Add segment (de)serialization round-trip test. 2016-06-23 14:32:23 -07:00
Jason Paryani
032713f8b9 Add asserts to test_response.py 2016-06-17 13:53:48 -07:00
Jason Paryani
5ffe7eb2f6 Fix response objects not referencing parents correctly
Fixes #103
2016-06-17 13:50:42 -07:00
Jason Paryani
e4c128de61 Test large reads 2016-06-17 13:50:26 -07:00
Jason Paryani
b45152dba2 Skip failing PyPy test due to travis's outdated version 2016-03-08 11:29:38 -08:00
Mike Lundy
8c3c57aa32 Make sure to encode to utf-8, not the default encoding
This allows text fields to take unicode strings under python 2.
2016-03-04 13:50:43 -08:00
Jason Paryani
c625981eb6 Check version info the old way because of python 2.6 2016-03-04 13:12:01 -08:00
Jason Paryani
2be308db27 Throw an exception on invalid BufferView instantiation
Also adjust tests to skip mmap under Python 2.
2016-03-04 12:42:45 -08:00
Benjamin Piwowarski
b7a9d05e5e Support mmap objects for reading with from_bytes 2016-02-05 17:32:40 +01:00
Jason Paryani
b863e9b9d6 Fix mistakenly discarding the file parameter on reads
Fixes #82
2015-12-04 16:01:28 -08:00
Jason Paryani
a4990f0868 Handle AnyPointers better as arguments to RPC functions 2015-06-08 14:59:21 -07:00
Jason Paryani
6f1ce8bcc5 Add support for using keyword arguments with a named struct in an RPC 2015-06-08 13:39:10 -07:00
Jason Paryani
606a325cfa Change sleep timer to be longer for test_rpc_calculator
Hopefully this fixes timing issues with the test on travisci
2015-06-03 15:29:33 -07:00
Jason Paryani
8f78a7c80b Add null capability test 2015-06-03 14:35:54 -07:00
Kamal Marhubi
b31b53b6a7 Add test for setting a field from a list 2015-05-30 19:45:58 -04:00
Jason Paryani
a5bf532d53 Add init method to lists 2015-05-04 11:00:25 -07:00
Jason Paryani
3d77722e88 Add support for unix sockets and improve rpc testing 2015-04-13 16:51:38 -07:00
Jason Paryani
e00bff6ef8 Fix problems with TwoPartyServer
Fixes #61

It turns out I messed up the Server initialization code for the case
where a string is passed in as the address. The tests only cover the
cases where a raw socket is passed in. This will be rectified in a
following commit.
2015-04-13 14:14:40 -07:00
Jason Paryani
5e7cb00a82 Skip broken test in PyPy
It works locally for me, and the error in TravisCI is starting to bug
me. Tracking this in #58
2015-03-09 23:40:03 -07:00
Jason Paryani
6e94182a3e Add bootstrap RPC methods
This is the new way for initializing RPC connections. It replaces the
deprecated restore functionality
2015-02-24 11:22:43 -08:00
Jason Paryani
c6754f84d9 Make test_roundtrip_*multiple tests more robust 2015-01-28 16:13:13 -08:00
Jason Paryani
88db4abc48 Add read_multiple_bytes/read_multiple_bytes_packed methods 2015-01-28 16:08:47 -08:00
Jason Paryani
b9c9c6bc5c Fix for upstream changes in kj::Exception
* Change from using Nature/Durability to Type
* Prefer to raise KjException directly instead of Value/RuntimError.
* Will still raise AttributeError appropriately.
2014-11-30 14:27:10 -08:00
Jason Paryani
42c0424e6e Add native types under capnp.types for use with ListSchema 2014-11-20 10:24:10 -08:00
Jason Paryani
977f471dec Add annotation tests for schema interface 2014-11-19 08:10:51 -08:00
Jason Paryani
a2ac913c63 Add as_interface/as_list methods to _DynamicObject* 2014-11-19 07:36:40 -08:00
Jason Paryani
4fb74372f2 Allow creation of ListSchema from other Schemas 2014-11-19 02:19:21 -08:00
Jason Paryani
0f0ced971d Add ListSchema class
Return it whenever the appropriate Type is converted to a Schema
2014-11-19 02:04:57 -08:00
Jason Paryani
b7fd9b526d Fix typo in test_struct 2014-10-27 16:31:55 -07:00
Jason Paryani
1d19d9f407 Handle ordered option failing under Python 2.6 2014-10-27 16:11:19 -07:00
Jason Paryani
ac5590cfc1 Add tests for verbose and ordered options for to_dict 2014-10-27 15:37:38 -07:00
Jason Paryani
1663ef8c61 Skip threading tests for pypy builds of pycapnp 2014-10-27 15:30:57 -07:00
Jason Paryani
ea1be42252 Add {_get,_set,_has,_init}_by_field methods for faster field access 2014-09-03 15:20:26 -07:00
Jason Paryani
a1f7d32853 Make pycapnp GIL friendly
Now calling `wait` from one thread will not block all threads
2014-07-09 00:49:35 -07:00
Jason Paryani
5befda532f Fix test_to_dict_enum under Python3 2014-06-26 01:07:16 -07:00