Comments (8)
and have you tried with python3.4? Or in combination with an earlier version of mongo 3.2.x?
from txmongo.
Please post here stacktraces of these FAILs, they may help to reason
from txmongo.
I don't get any stacktrace when I execute the test, only the FAIL.
[FAIL]
Traceback (most recent call last):
File "/home/ark/repositorios/rest-service/venv/lib/python3.5/site-packages/twisted/internet/defer.py", line 1128, in _inlineCallbacks
result = g.send(result)
File "/home/ark/repositorios/txmongo/tests/test_queries.py", line 656, in test_UnorderedUnack
self.assertEqual(count, 2)
File "/home/ark/repositorios/rest-service/venv/lib/python3.5/site-packages/twisted/trial/_synctest.py", line 437, in assertEqual
super(_Assertions, self).assertEqual(first, second, msg)
File "/usr/local/lib/python3.5/unittest/case.py", line 820, in assertEqual
assertion_func(first, second, msg=msg)
File "/usr/local/lib/python3.5/unittest/case.py", line 813, in _baseAssertEqual
raise self.failureException(msg)
twisted.trial.unittest.FailTest: 0 != 2
tests.test_queries.TestInsertMany.test_UnorderedUnack
-------------------------------------------------------------------------------
Ran 1 tests in 0.011s
FAILED (failures=1)
Compilation exited abnormally with code 1 at Tue Apr 12 09:17:05
The input is:
docs = [{'x': 1}, {'x': 2, '$': "error"}, {'x': 3}]
from txmongo.
I tested with a mongo2.4 I have installed, and the two tests are OK.
from txmongo.
Yeah, I confirm failues with MongoDB 3.0 and 3.2 with any version of Python. That strange, because all tests were passing on Travis with MongoDB 3.0.11...
from txmongo.
Whoops, I was wrong. I re-checked again and seems that failues are only with MongoDB 3.2.x.
from txmongo.
Ok, seems like 3.2 does document validating differently than 3.0. I've tested how insert_many
deals with failues by inserting [{'x':1}, {'x':2, '$': "error"}, {'x':3}]
. Mongo 3.0 did validation before inserting each document, so it inserted first and third. But 3.2 seems to do validation of all docs before doing anything, so it inserts none. I've changed these tests to use [{"_id": 1}, {"_id": 1, }, {"_id": 2}]
and now they passing on both 3.0 and 3.2.
Created #151
from txmongo.
Great find and detective work!
from txmongo.
Related Issues (20)
- In disconnect: RuntimeError: dictionary changed size during iteration HOT 2
- When txmongo fails to connect mongodb, there is a memory leak HOT 8
- latest txmongo does not work with pymongo 3.7 HOT 3
- do not connect to mongodb+srv:// scheme HOT 1
- Does txmongo support compressors option? HOT 1
- builtins.AttributeError: '_CaseInsensitiveDictionary' object has no attribute 'copy' HOT 3
- Crash create_index: pymongo.errors.OperationFailure: cannot write to 'remains.system.indexes' HOT 2
- AssertionError: Tried to stop a LoopingCall that was not running. HOT 3
- txmongo not working with azure cosmos db HOT 19
- There should be a limit on the number of retries HOT 1
- insert_many does not work properly HOT 6
- maxIdleTimeMS support HOT 4
- does txmongo support transaction? HOT 2
- Proposing a PR to fix a few small typos HOT 1
- insert_many: unexpected keyword argument 'bypass_document_validation' in calling pymongo `_Bulk` HOT 2
- Import error with PyMongo==4.1.1. HOT 3
- Incompatible with mongodb >= 5.1 due to usage of deprecated `OP_QUERY` commands HOT 2
- txmongo with DocumentDB
- Incompatible with any version of DocumentDB HOT 3
- pymongo.errors.OperationFailure: TxMongo: not authorized for query on foo.test HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from txmongo.