more pylint and uncompressed .gramps

This commit is contained in:
prculley
2016-06-02 11:36:53 -05:00
parent 5182055c1f
commit 84e12210cc
9 changed files with 15 additions and 8 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -52,7 +52,7 @@ _det_id = False
def create_id(): def create_id():
global _rand global _rand
if _det_id is True: if _det_id:
_rand = _rand + 1 _rand = _rand + 1
return "%08x%08x" % (_rand, _rand) return "%08x%08x" % (_rand, _rand)
else: else:

View File

@@ -1,5 +1,6 @@
#! /usr/bin/env python3 #! /usr/bin/env python3
""" Test program for import modules """ """ Test program for import modules
"""
# #
# Gramps - a GTK+/GNOME based genealogy program # Gramps - a GTK+/GNOME based genealogy program
# #
@@ -44,11 +45,13 @@ TEST_DIR = os.path.abspath(os.path.join(DATA_DIR, "tests"))
class CompleteCheck(unittest.TestCase): class CompleteCheck(unittest.TestCase):
"""The test class cases will be dynamically created at import time from """The test class cases will be dynamically created at import time from
files to be tested. The following defs are used by the test cases""" files to be tested. The following defs are used by the test cases
"""
def prepare_result(self, diffs, added, missing): def prepare_result(self, diffs, added, missing):
""" Looks through the diffs, added, and missing items and begins """ Looks through the diffs, added, and missing items and begins
reporting process. Returns True if there were significant errors. """ reporting process. Returns True if there were significant errors.
"""
# pylint: disable=E1101 # pylint: disable=E1101
# pylint does not like dynamically created methods # pylint does not like dynamically created methods
deltas = False deltas = False
@@ -113,7 +116,8 @@ class CompleteCheck(unittest.TestCase):
def _report_details(path, diff1, diff2): def _report_details(path, diff1, diff2):
""" Checks if a detail is significant, needs adjusting for xml filter """ Checks if a detail is significant, needs adjusting for xml filter
effects, and returns a string describing the specific difference.""" effects, and returns a string describing the specific difference.
"""
if isinstance(diff1, bool): if isinstance(diff1, bool):
desc1 = repr(diff1) desc1 = repr(diff1)
else: else:
@@ -148,7 +152,8 @@ def _report_details(path, diff1, diff2):
def _format_struct_path(path): def _format_struct_path(path):
""" prepares a 'path' string for the report out of the structure. """ """ prepares a 'path' string for the report out of the structure.
"""
retval = "" retval = ""
parts = path.split(".") parts = path.split(".")
for part in parts: for part in parts:
@@ -164,10 +169,12 @@ def _format_struct_path(path):
def make_tst_function(tstfile, file_name): def make_tst_function(tstfile, file_name):
""" This is here to support the dynamic function creation. This creates """ This is here to support the dynamic function creation. This creates
the test function (a method, to be precise). """ the test function (a method, to be precise).
"""
def tst(self): def tst(self):
""" This compares the import file with the expected result '.gramps' """ This compares the import file with the expected result '.gramps'
file. """ file.
"""
self.user = User(quiet=True) self.user = User(quiet=True)
fn1 = os.path.join(TEST_DIR, tstfile) fn1 = os.path.join(TEST_DIR, tstfile)
fn2 = os.path.join(TEST_DIR, (file_name + ".gramps")) fn2 = os.path.join(TEST_DIR, (file_name + ".gramps"))