Without this change, current implementaiton produces a false positive
result for AssertionError type.
Example of falsely passing test code:
def test(a, b):
assert a > 10
assert b > 10
self.assertRaises(AssertionError, test, 20, 20)
A number of fields (services, appearance, manufacturer, name) can appear
when a scan is requested. However there is only so much space in the
header so, if a user has configured multiple fields, some may be 'pushed'
into the active scan response which requires additional communication.
When iOS scans for BLE devices it can filter by services, and so services
must be in the advertising (as opposed to scan response) payload.
- cp() copies a file. If the target is a directory, the file is copied
into that directory. It uses a small buffer, so it's not fast.
- ls uses ilistdir and creates a sorted output with directories listed as
the first group.
- rm optionally deletes recursive, if the target is a directory.
It can be difficult using the codeformat.py tool when there are other files
in the repository not currently matching the standard.
For developers, running over the entire repo can throw up a large list of
changes in a local git which can lead to inclusion of unrelated changes in
commits if they're added accidentally. If the files arg is used to trim
down the list of files scanned, it runs a risk of missing some files
they've modified. In CI, it means that PR's can fail on codeformat for
issues that aren't related to that PR.
This change adds a git query in the codeformat tool by default to only work
on the list of files that have been modified in the current branch. This
can still be overridden by the files arg to run over all files still, eg.
python3 tools/codeformat.py -v '**'.
This new module is a port of Python datetime providing classes for
manipulating dates, times, and deltas. It completely replaces the existing
unix-ffi version.
Signed-off-by: Lorenzo Cappelletti <lorenzo.cappelletti@gmail.com>
Allows `await channel.disconnected()`.
This also fixes a bug where connection._l2cap_channel wasn't being set to
None on disconnect.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
This replicates the failure described in #453 (which is fixed by #459.
Also adds a test for subscription.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
This allows a server to write a characteristic and automatically
notify/indicate all subscribed clients.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
After a client does a successful `await char.notified()`, then before the
next call to `notified()` a notification arrives, then they call
`notified()` twice before the _next_ notification, the second call will
return None rather than waiting.
This applies the same fix as in 5a86aa5866
which solved a similar problem for server-side `char.written()`. Using
a deque is slightly overkill here, but it's consistent with the server
side, and also makes it very easy to support having a notification queue
in the future.
Also makes the client characteristic properly flags/properties-aware (i.e.
explicitly fail operations that aren't supported).
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>