#1851 discard empty notes (and warn), also warn of skipped subordinates (see want_parse_warnings), update test util per warnings change

svn: r10147
This commit is contained in:
James G Sack
2008-03-01 06:58:17 +00:00
parent 825b301f7f
commit 8e3e98d571
4 changed files with 65 additions and 21 deletions

View File

@@ -44,6 +44,8 @@ _head ="""
# _tail is presently a single (SUBM) record plus the trailer
# to satisfy the "one or more records" in the spec
# it also provides a target for the xref in the header
# it also gives a "skipping 1 subordinate.." message error
# which presumeably will be fixed someday
_tail = """
0 @SUBM1@ SUBM
1 NAME test /gedread/
@@ -65,6 +67,8 @@ def make_gedcom_input(gfile, fragment):
# code patterned after contents of ReadGedcom.import2,
# but avoiding the occurrence of a popup DialogError.
# NOTE: may need rewrite to track mods in ReadGedcom
# test this code via src/test/test/gedread_util_test.py
# -------------------------------------------------------
def gread(db, fname):
"""read gedcom file into a test db

View File

@@ -44,7 +44,9 @@ class Test(U.TestCase):
gr.gread(db, infil)
logging.warn("nothing here")
loglines = tl.logfile_getlines()
self.assertEquals(len(loglines),1,
#NB incorrect SUBM handling causes one extraneous warning
xWarns = 1
self.assertEquals(len(loglines),1 + xWarns,
"log has no unexpected content")
# verify one person in database
np = db.get_number_of_people()