fix minor styling issue

This commit is contained in:
Bastien Gérard 2019-12-14 15:39:02 +01:00
parent 6bc4e602bb
commit 9166ba91d7
5 changed files with 8 additions and 5 deletions

View File

@ -135,6 +135,7 @@ def test_big_doc():
% (timeit(create_and_delete_company, 10) * 10 ** 3) % (timeit(create_and_delete_company, 10) * 10 ** 3)
) )
if __name__ == "__main__": if __name__ == "__main__":
test_basic() test_basic()
print("-" * 100) print("-" * 100)

View File

@ -426,7 +426,7 @@ class StrictDict(object):
return listitems(self) == listitems(other) return listitems(self) == listitems(other)
def __ne__(self, other): def __ne__(self, other):
return not(self == other) return not (self == other)
@classmethod @classmethod
def create(cls, allowed_keys): def create(cls, allowed_keys):

View File

@ -143,7 +143,7 @@ setup(
long_description=LONG_DESCRIPTION, long_description=LONG_DESCRIPTION,
platforms=["any"], platforms=["any"],
classifiers=CLASSIFIERS, classifiers=CLASSIFIERS,
install_requires=['pymongo>=3.4', 'six', 'future'], install_requires=["pymongo>=3.4", "six", "future"],
cmdclass={"test": PyTest}, cmdclass={"test": PyTest},
**extra_opts **extra_opts
) )

View File

@ -267,8 +267,8 @@ class TestSequenceField(MongoDBTestCase):
foo = Foo(name="Foo") foo = Foo(name="Foo")
foo.save() foo.save()
assert ( assert "base.counter" not in self.db["mongoengine.counters"].find().distinct(
"base.counter" not in self.db["mongoengine.counters"].find().distinct("_id") "_id"
) )
existing_counters = self.db["mongoengine.counters"].find().distinct("_id") existing_counters = self.db["mongoengine.counters"].find().distinct("_id")
assert "foo.counter" in existing_counters assert "foo.counter" in existing_counters

View File

@ -58,7 +58,9 @@ class TestSignal(unittest.TestCase):
@classmethod @classmethod
def post_save(cls, sender, document, **kwargs): def post_save(cls, sender, document, **kwargs):
dirty_keys = list(document._delta()[0].keys()) + list(document._delta()[1].keys()) dirty_keys = list(document._delta()[0].keys()) + list(
document._delta()[1].keys()
)
signal_output.append("post_save signal, %s" % document) signal_output.append("post_save signal, %s" % document)
signal_output.append("post_save dirty keys, %s" % dirty_keys) signal_output.append("post_save dirty keys, %s" % dirty_keys)
if kwargs.pop("created", False): if kwargs.pop("created", False):