MCPcopy Create free account
hub / github.com/mongodb/mongo-python-driver / require_pymongocrypt_min

Method require_pymongocrypt_min

test/__init__.py:522–533  ·  view source on GitHub ↗
(self, *ver)

Source from the content-addressed store, hash-verified

520 )
521
522 def require_pymongocrypt_min(self, *ver):
523 other_version = Version(*ver)
524 if not _HAVE_PYMONGOCRYPT:
525 version = Version.from_string("0.0.0")
526 else:
527 from pymongocrypt import __version__ as pymongocrypt_version
528
529 version = Version.from_string(pymongocrypt_version)
530 return self._require(
531 lambda: version >= other_version,
532 "PyMongoCrypt version must be at least %s" % str(other_version),
533 )
534
535 def require_auth(self, func):
536 """Run a test only if the server is running with auth enabled."""

Callers

nothing calls this directly

Calls 3

_requireMethod · 0.95
VersionClass · 0.90
from_stringMethod · 0.80

Tested by

no test coverage detected