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

zarr-developers / zarr / 1393 / 3
100%
master: 100%

Build:
DEFAULT BRANCH: master
Ran 13 Feb 2019 07:41PM UTC
Files 29
Run time 29min
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

13 Feb 2019 07:30PM UTC coverage: 98.832% (-0.02%) from 98.854%
1393.3

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

8544 of 8645 relevant lines covered (98.83%)

0.99 hits per line

Source Files on job 1393.3
  • Tree
  • List 0
  • Changed 2
  • Source Changed 2
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 1301
  • Travis Job 1393.3
  • 3c0e0f5a on github
  • Prev Job for on master (#1366.1)
  • Next Job for on master (#1402.1)
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