Commit Graph

134 Commits

Author SHA1 Message Date
Jacob Alexander
3de13c3718 Updating simple example servers to not use run_forever (can't Ctrl+c)
- Adding xfail to simple servers as they tend to not like certain
  versions of python when called repeated for testing
2020-11-20 00:17:52 -08:00
Jacob Alexander
5e8ccba536 Updating docs for v1.0.0b2
- Full cleanup of all the docs
- General sphinx housekeeping
- Updated all the old/bad links
- More reliable tests
- Updated Changelog
- Removed dead/deprecated code
- Added documentation generation test
2020-06-14 17:05:45 -07:00
Jacob Alexander
6532ca571d Adding SSL version of the calculator example
- Used to test asyncio SSL on Windows mainly
- Skipping asyncio thread tests on Windows (due to getTimer wrapper bug
  on Windows)
2020-06-10 14:33:45 -07:00
Jacob Alexander
255119b838 Updating to capnproto v0.8.0
- Includes some test stabilization
- Fixes manylinux2010 build issues (linker flag order due to old gcc)
- More rigorous python setup.py clean
- Requires capnproto v0.8.0 or greater
- Including system libcapnp include path for import (e.g. import
  stream_capnp)
- Bundle libcapnp .capnp files when not using system libcapnp
- Removing more distutils usage. Now using pkg-config to determine the
  system version of libcapnp (mainly for Linux, but should work on macOS
  with brew)
- Removed dead code

Resolves issues #215 #216 #217
Lots of fixes for Issue #218 (all sorts of retry methods needed for
GitHub Actions)
2020-06-08 11:49:17 -07:00
Andrey Cizov
d94d60db8b get rid of all warnings during tests 2019-12-26 22:25:56 -08:00
Jacob Alexander
fc75e4083d Fixing remaining flake8 lint warnings 2019-12-11 22:44:44 -08:00
Jacob Alexander
362cce345b Fixing Windows tests
- Adding import path filter to exclude non-directories
  Otherwise kj will through exceptions
- Skipped AF_UNIX socket test
- Use default socket configuration when it doesn't matter the type of
socket used
- Open files with utf8 encoding (needed for text validation)
- Explictly call python executable when running external scripts
- Fix path creation to always use os.path.join
- Added timeout to client wait in some tests

- Some broken tests still remain (most likely asyncio related)
2019-10-19 00:26:55 -07:00
Jacob Alexander
7789ebbf96 Fixing flake8 linting errors 2019-10-15 01:08:11 -07:00
Jacob Alexander
0e830c2127 Minor test fixes for Linux with IPv6 2019-10-15 01:04:00 -07:00
Jacob Alexander
f6dd08dda6 Removing deprecated Restorer and ezRestore references
- Not recommended to be used in new designs
- Just pollutes warning messages during compilation (hiding ones that
should be fixed)
- Updated test code to use bootstrap
- Sped up some of the test code that was just sleeping while waiting for
the server (now polling for the socket)
2019-10-14 23:19:39 -07:00
Jacob Alexander
940ab9916d Adding reconnecting async ssl example
- async_reconnecting_ssl_client.py will automatically close and
reconnect to a server when it becomes available (rather than hanging or
dying when the server disappears)
2019-10-05 14:50:56 -07:00
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