From 5facba45c83f7daaacc49e66306e13a35aeb74be Mon Sep 17 00:00:00 2001 From: Ben McGinnes Date: Sat, 18 Aug 2018 20:29:14 +1000 Subject: Python bindings tests: Near PEP8 compliance * PEP8 compliance for the vast majoeity of the tests. --- lang/python/tests/t-data.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'lang/python/tests/t-data.py') diff --git a/lang/python/tests/t-data.py b/lang/python/tests/t-data.py index 5cf074c5..006c11f4 100755 --- a/lang/python/tests/t-data.py +++ b/lang/python/tests/t-data.py @@ -18,14 +18,15 @@ # License along with this program; if not, see . from __future__ import absolute_import, print_function, unicode_literals -del absolute_import, print_function, unicode_literals import io import os import tempfile import gpg import support -_ = support # to appease pyflakes. +_ = support # to appease pyflakes. + +del absolute_import, print_function, unicode_literals data = gpg.Data('Hello world!') assert data.read() == b'Hello world!' @@ -94,7 +95,8 @@ with tempfile.NamedTemporaryFile() as tmp: # Open using name, offset, and length. data = gpg.Data(file=tmp.name, offset=23, length=42) - assert data.read() == binjunk[23:23+42] + assert data.read() == binjunk[23:23 + 42] + # Test callbacks. class DataObject(object): @@ -118,6 +120,7 @@ class DataObject(object): assert not self.released self.released = True + do = DataObject() cookie = object() data = gpg.Data(cbs=(do.read, do.write, do.seek, do.release, cookie)) -- cgit v1.2.3