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)
)
if __name__ == "__main__":
test_basic()
print("-" * 100)

View File

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

View File

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

View File

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

View File

@ -58,7 +58,9 @@ class TestSignal(unittest.TestCase):
@classmethod
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 dirty keys, %s" % dirty_keys)
if kwargs.pop("created", False):