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

MongoEngine / mongoengine / 2855 / 5
94%
master: 94%

Build:
DEFAULT BRANCH: master
Ran 26 Jun 2019 09:33AM UTC
Files 26
Run time 3s
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

26 Jun 2019 09:31AM UTC coverage: 93.068% (-0.05%) from 93.114%
MONGODB=${MONGODB_3_4} PYMONGO=3.4.x

push

travis-ci

web-flow
Drop support for positional arguments when instantiating a document (#2103)

For example, if you had the following class:
```
class Person(Document):
    name = StringField()
    age = IntField()
```

You could instantiate an object of such class by doing one of the following:
1. `new_person = Person('Tom', 30)`
2. `new_person = Person('Tom', age=30)`
3. `new_person = Person(name='Tom', age=30)`

From now on, only option (3) is allowed.

Supporting positional arguments may sound like a reasonable idea in this
heavily simplified example, but in real life it's almost never what you want
(especially if you use inheritance in your document definitions) and it may
lead to ugly bugs. We should not rely on the *order* of fields to match a given
value to a given name.

This also helps us simplify the code e.g. by dropping the confusing (and
undocumented) `BaseDocument._auto_id_field` attribute.

4914 of 5280 relevant lines covered (93.07%)

0.93 hits per line

Source Files on job 2855.5 (MONGODB=${MONGODB_3_4} PYMONGO=3.4.x)
  • Tree
  • List 0
  • Changed 3
  • Source Changed 2
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 2719
  • Travis Job 2855.5
  • ffedd331 on github
  • Prev Job for MONGODB=${MONGODB_3_4} PYMONGO=3.4.x on master (#2852.5)
  • Next Job for MONGODB=${MONGODB_3_4} PYMONGO=3.4.x on master (#2864.5)
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