Commit Graph

106 Commits

Author SHA1 Message Date
Steven Silvester
f0c9ff3e48
MOTOR-1187 Fix Motor Types (#237)
* MOTOR-1187 Fix Motor Types

* make searchindexmodel optional

* fix tests
2023-11-13 08:25:44 -06:00
Steven Silvester
684279ed0a
MOTOR-1194 Replace flake8 and isort with ruff (#231)
* adopt ruff

* fixups

* cleanup

* update traceback
2023-10-20 13:45:21 -05:00
Steven Silvester
f905df8553
MOTOR-1139 Switch to Pytest (#222) 2023-08-23 15:52:07 -05:00
Steven Silvester
5e07f66799
MOTOR-897 Set up flake8 (#146) 2022-02-17 15:28:07 -06:00
Steven Silvester
1e62b868ea
MOTOR-896 Add automatic code formatting (#144) 2022-02-15 20:29:02 -06:00
Prashant Mital
ed02ce5e75
MOTOR-614 Use Python 3 syntax for super() calls (#89) 2020-09-21 13:14:13 -07:00
Prashant Mital
8208420d61
MOTOR-581 Remove __future__ imports (#64) 2020-07-28 17:51:10 -07:00
Shane Harvey
6248419704 Fix synchro tests with PyMongo 3.9
MOTOR-401 Skip get_default_database tests
MOTOR-402 MOTOR-403 Skip internal pymongo tests
MOTOR-404 Add db.aggregate/db.watch/client.watch to synchro tests
MOTOR-407 Add missing private __die attribute on _LatentCursor
MOTOR-409 Skip flakey CMAP test
Skip tests for group
Skip TestCursor.test_min_max_without_hint
Enable faulthandler
Properly implement _SynchroTransactionContext
2019-10-10 16:16:37 -07:00
A. Jesse Jiryu Davis
d404bae4e3 MOTOR-186 Standard driver API examples 2018-01-17 13:07:38 -05:00
A. Jesse Jiryu Davis
1851fdb6fa MOTOR-138 Drop Python 2.6 2017-04-23 22:43:04 -05:00
A. Jesse Jiryu Davis
d499891465 Implement python setup.py test --xunit-output. 2016-12-02 11:45:52 -05:00
A. Jesse Jiryu Davis
67502114cd Unused import. 2015-11-10 20:45:04 -05:00
A. Jesse Jiryu Davis
b8149e8a22 Remove backport of assertRaises.
Not needed now that we depend on unittest2.
2015-10-16 23:15:16 -04:00
A. Jesse Jiryu Davis
05cfad9922 Refactor stream_to_handler tests. 2015-10-16 22:54:24 -04:00
A. Jesse Jiryu Davis
c4947d5f06 MOTOR-75 Update HA tests. 2015-08-31 22:42:20 -04:00
A. Jesse Jiryu Davis
cfefac3efe Update copyright headers. 2015-08-31 22:42:20 -04:00
A. Jesse Jiryu Davis
1b2a4c903b MOTOR-75 Skip asyncio or Tornado tests if need be.
Move the Tornado-specific suite into a subdirectory and skip it if
Tornado is not installed.
2015-08-31 22:42:20 -04:00
A. Jesse Jiryu Davis
f406c1f906 Adapt auth tests to modern mongod.
If mongod 2.6+ was started with auth from a config file, the auth
params appear in the "parsed" subdocument of getCmdLineOpts. Use the
same logic as PyMongo's tests to determine if auth is enabled.
2015-08-28 09:24:23 -04:00
A. Jesse Jiryu Davis
98efd5ede5 Unused copy of is_server_resolvable().
Some duplicate test setup code.
2015-08-26 22:16:27 -04:00
A. Jesse Jiryu Davis
9a455a046b MOTOR-75 Set up tests once if Tornado & asyncio are installed. 2015-08-26 22:11:48 -04:00
Andrew Svetlov
6539544513 Add newlines 2015-08-14 22:41:02 -04:00
A. Jesse Jiryu Davis
e555781ae0 Unused import. 2015-07-01 12:09:46 -04:00
A. Jesse Jiryu Davis
6eee9cefe7 MOTOR-40 Don't even try to load asyncio tests in Python 2.
Syntax errors like "yield from" prevent us from skipping
the modules gracefully.
2015-07-01 12:09:45 -04:00
A. Jesse Jiryu Davis
094931ce88 Don't use ssl options plus ssl=False in tests. 2015-06-30 12:04:53 -04:00
A. Jesse Jiryu Davis
4b9204d8b7 Complete merging r0.4's testing code to master. 2015-06-30 12:04:10 -04:00
A. Jesse Jiryu Davis
7555d37eff Finish updating master from r0.4 (mainly 0.4.1 changes).
* r0.4:
  Start 3 config dbs in HA test.
  Ensure configdb's log dir in test
  Better logging in HA test tools
  Version -> +
  BUMP 0.4.1
  Speculate about future Motor and PyMongo versions.
  Add Tornado 4.1 to compatibility matrix.
  Tests get user and password from environment.
  MOTOR-66 - Deadlock in RS client startup.

Conflicts:
	doc/changelog.rst
	motor/__init__.py
	test/__init__.py
2015-06-29 19:02:04 -04:00
A. Jesse Jiryu Davis
2c8146326c Tests get user and password from environment. 2015-05-08 22:08:45 -04:00
rejoc
87f3c4244b All tests seem to pass 2015-04-06 14:26:31 +02:00
A. Jesse Jiryu Davis
c9789294de MOTOR-61 Prevent concurrent RS monitors.
If the monitor was stalled, MotorReplicaSetClient could start concurrent
monitor greenlets, causing obscure races.
2015-01-29 17:56:57 -05:00
A. Jesse Jiryu Davis
1f1f7dab83 More quickly determine if mongod is running SSL. 2014-11-18 19:39:44 -05:00
A. Jesse Jiryu Davis
284df221cd Await replication when clearing a big test collection.
Debug some replication timeouts in later tests.
2014-11-18 19:39:44 -05:00
A. Jesse Jiryu Davis
8ba3f40248 Use motor_test DB in exhaust cursor tests. 2014-11-18 19:39:44 -05:00
A. Jesse Jiryu Davis
df3e30e4e1 Exhaust cursor tests.
Port PYTHON-736 tests from PyMongo to Motor.
2014-11-18 19:39:43 -05:00
A. Jesse Jiryu Davis
6999786ed4 Debug test_del_on_main_greenlet. 2014-11-18 19:39:43 -05:00
A. Jesse Jiryu Davis
997cef8064 All SSL tests can now be run under various configurations. 2014-11-18 19:39:42 -05:00
A. Jesse Jiryu Davis
557d5e044b Import style. 2014-11-18 19:39:42 -05:00
A. Jesse Jiryu Davis
069eeaf96b Correct useless MotorCursor.__del__ tests.
Conflicts:
	test/test_motor_cursor.py
2014-11-18 19:39:42 -05:00
A. Jesse Jiryu Davis
2fa8ae712b Let tests proceed with auth even if previous run didn't clean up.
Conflicts:
	test/test_environment.py
2014-11-18 19:39:42 -05:00
A. Jesse Jiryu Davis
6ace48c631 Rename "test --warn" to more descriptive "--tornado-warnings".
When we test network error handling, Tornado logs warnings. They are suppressed by default,
but this option allows them to be displayed.
2014-11-18 19:39:41 -05:00
A. Jesse Jiryu Davis
f4c489f614 MOTOR-51 Use add_user again in tests.
PyMongo's add_user helper is now fixed for
MongoDB 2.8+.
2014-11-18 19:39:40 -05:00
A. Jesse Jiryu Davis
a64d093c92 By default, don't let Tornado log warnings during tests. 2014-11-18 19:39:40 -05:00
A. Jesse Jiryu Davis
ea726624a5 Refactor tests' setup_package(). 2014-11-18 19:39:40 -05:00
A. Jesse Jiryu Davis
13606fa976 MOTOR-38, fix RS tests for narrowed localhost exception.
See SERVER 12621. This applies the previous fixes, but to
replica set tests specifically.
2014-11-18 19:39:40 -05:00
A. Jesse Jiryu Davis
0c0c542f14 MOTOR-38, fix tests for narrowed localhost exception.
See SERVER 12621, nearly the only thing allowed on MongoDB 2.7.1+,
for a server started with auth but with no users, is to create an admin
user. Motor's tests now detect this case and immediately create an
admin user. The test MotorClient remains logged in as the admin user
throughout the suite.
2014-11-18 19:39:40 -05:00
A. Jesse Jiryu Davis
606c3d0863 No need to set env.is_replica_set to False twice. 2014-11-18 19:39:40 -05:00
A. Jesse Jiryu Davis
1c03ea8cfb Reduce reliance on PyMongo in tests. 2014-11-18 19:39:39 -05:00
A. Jesse Jiryu Davis
eeb53a7b22 Collect server info in a TestEnvironment instance. 2014-11-18 19:39:39 -05:00
A. Jesse Jiryu Davis
f63e3108e7 Use PyMongo's technique for running suite-level setup and teardown.
Motor had a setUpModule() function in each module, which ran setup_package if it hadn't run yet.
Remove this and use PyMongo's technique, a TextTestRunner subclass that runs suite-level setup
and teardown, and a custom 'setup.py test' command that runs our special runner.
2014-11-18 19:39:39 -05:00
A. Jesse Jiryu Davis
e17e85db3f Whole test suite can run with SSL enabled, not just test_motor_ssl. 2014-07-26 15:29:04 -07:00
A. Jesse Jiryu Davis
0b606cd7f0 Import style. 2014-07-26 15:15:58 -07:00