• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

zarr-developers / zarr / 1393
100%

Build:
DEFAULT BRANCH: master
Ran 13 Feb 2019 07:36PM UTC
Jobs 4
Files 29
Run time 111min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
1393

push

travis-ci

web-flow
Use binary_type in MongoDBStore.__getitem__ for Python 2 only (#401)

* Drop binary_type cast in MongoDBStore.__getitem__

* Coerce PyMongo values to `binary_type` on Python 2

On both Python 2 and Python 3, PyMongo converts `binary_type` (i.e.
`bytes`) to BSON type 5 (Binary data) with subtype 0 to store in the
MongoDB instance. When reading that data back out, PyMongo handles BSON
type 5 (Binary data) with subtype 0 differently depending on the Python
version.

On Python 2, it creates a `bson.Binary` instance with the data. Normally
we would coerce this to a `bytes` object using `ensure_bytes`. However
that fails as `bson.Binary` is a subclass of `bytes`. So instead we
explicitly force it to `bytes` (i.e.  `binary_type`). On Python 3,
PyMongo automatically converts the data to `bytes`. Thus we don't need
to do anything there.

ref: http://api.mongodb.com/python/current/python3.html#id3
ref: http://api.mongodb.com/python/current/api/bson/binary.html#bson.binary.Binary

8645 of 8645 relevant lines covered (100.0%)

3.96 hits per line

Jobs
ID Job ID Ran Files Coverage
1 1393.1 13 Feb 2019 07:36PM UTC 0
98.85
Travis Job 1393.1
2 1393.2 13 Feb 2019 07:36PM UTC 0
98.83
Travis Job 1393.2
3 1393.3 13 Feb 2019 07:41PM UTC 0
98.83
Travis Job 1393.3
4 1393.4 13 Feb 2019 07:36PM UTC 0
99.39
Travis Job 1393.4
Source Files on build 1393
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #1393
  • 3c0e0f5a on github
  • Prev Build on master (#1366)
  • Next Build on master (#1402)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc