Merge remote-tracking branch 'upstream/master' into test_imports
This commit is contained in:
commit
7646d41774
@ -207,12 +207,23 @@ class BaseTest(unittest.TestCase):
|
|||||||
"""
|
"""
|
||||||
Test IsEnclosedBy rule.
|
Test IsEnclosedBy rule.
|
||||||
"""
|
"""
|
||||||
rule = IsEnclosedBy(['P0001'])
|
rule = IsEnclosedBy(['P0001', '0'])
|
||||||
self.assertEqual(self.filter_with_rule(rule), set([
|
self.assertEqual(self.filter_with_rule(rule), set([
|
||||||
b'EAFKQCR0ED5QWL87EO', b'S22LQCLUZM135LVKRL', b'VDUJQCFP24ZV3O4ID2',
|
b'EAFKQCR0ED5QWL87EO', b'S22LQCLUZM135LVKRL', b'VDUJQCFP24ZV3O4ID2',
|
||||||
b'V6ALQCZZFN996CO4D', b'OC6LQCXMKP6NUVYQD8', b'CUUKQC6BY5LAZXLXC6',
|
b'V6ALQCZZFN996CO4D', b'OC6LQCXMKP6NUVYQD8', b'CUUKQC6BY5LAZXLXC6',
|
||||||
b'PTFKQCKPHO2VC5SYKS', b'PHUJQCJ9R4XQO5Y0WS']))
|
b'PTFKQCKPHO2VC5SYKS', b'PHUJQCJ9R4XQO5Y0WS']))
|
||||||
|
|
||||||
|
def test_isenclosedby_inclusive(self):
|
||||||
|
"""
|
||||||
|
Test IsEnclosedBy rule with inclusive option.
|
||||||
|
"""
|
||||||
|
rule = IsEnclosedBy(['P0001', '1'])
|
||||||
|
self.assertEqual(self.filter_with_rule(rule), set([
|
||||||
|
b'c96587262e91149933fcea5f20a', b'EAFKQCR0ED5QWL87EO',
|
||||||
|
b'S22LQCLUZM135LVKRL', b'VDUJQCFP24ZV3O4ID2', b'V6ALQCZZFN996CO4D',
|
||||||
|
b'OC6LQCXMKP6NUVYQD8', b'CUUKQC6BY5LAZXLXC6', b'PTFKQCKPHO2VC5SYKS',
|
||||||
|
b'PHUJQCJ9R4XQO5Y0WS']))
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
unittest.main()
|
unittest.main()
|
||||||
|
@ -88,7 +88,7 @@ def importData(database, filename, user):
|
|||||||
except IOError:
|
except IOError:
|
||||||
return
|
return
|
||||||
|
|
||||||
if not gramps and ansel:
|
if not gramps and ansel and user.uistate:
|
||||||
top = Glade()
|
top = Glade()
|
||||||
code = top.get_object('codeset')
|
code = top.get_object('codeset')
|
||||||
code.set_active(0)
|
code.set_active(0)
|
||||||
|
@ -4344,6 +4344,8 @@ class GedcomParser(UpdateCallback):
|
|||||||
attr.set_type(AttributeType.NICKNAME)
|
attr.set_type(AttributeType.NICKNAME)
|
||||||
attr.set_value(line.data)
|
attr.set_value(line.data)
|
||||||
state.person.add_attribute(attr)
|
state.person.add_attribute(attr)
|
||||||
|
elif name_len == 0:
|
||||||
|
return
|
||||||
else:
|
else:
|
||||||
name = Name()
|
name = Name()
|
||||||
surname = Surname()
|
surname = Surname()
|
||||||
|
@ -198,7 +198,11 @@ class DetDescendantReport(Report):
|
|||||||
def apply_henry_filter(self,person_handle, index, pid, cur_gen=1):
|
def apply_henry_filter(self,person_handle, index, pid, cur_gen=1):
|
||||||
if (not person_handle) or (cur_gen > self.max_generations):
|
if (not person_handle) or (cur_gen > self.max_generations):
|
||||||
return
|
return
|
||||||
self.dnumber[person_handle] = pid
|
if person_handle in self.dnumber:
|
||||||
|
if self.dnumber[person_handle] > pid:
|
||||||
|
self.dnumber[person_handle] = pid
|
||||||
|
else:
|
||||||
|
self.dnumber[person_handle] = pid
|
||||||
self.map[index] = person_handle
|
self.map[index] = person_handle
|
||||||
|
|
||||||
if len(self.gen_keys) < cur_gen:
|
if len(self.gen_keys) < cur_gen:
|
||||||
|
4
setup.py
4
setup.py
@ -180,8 +180,8 @@ def build_man(build_cmd):
|
|||||||
filename = False
|
filename = False
|
||||||
|
|
||||||
lang = man_dir[8:]
|
lang = man_dir[8:]
|
||||||
src = build_cmd.build_base + '/data/man/' + lang + '/gramps.1.gz'
|
src = build_cmd.build_base + '/data/man' + lang + '/gramps.1.gz'
|
||||||
target = 'share/man/' + lang + '/man1'
|
target = 'share/man' + lang + '/man1'
|
||||||
data_files.append((target, [src]))
|
data_files.append((target, [src]))
|
||||||
|
|
||||||
def build_intl(build_cmd):
|
def build_intl(build_cmd):
|
||||||
|
Loading…
Reference in New Issue
Block a user