[geneagrapher] 156/226: Added test for extracting information from record with no descendants.
Doug Torrance
dtorrance-guest at moszumanska.debian.org
Sat Jul 11 17:10:58 UTC 2015
This is an automated email from the git hooks/post-receive script.
dtorrance-guest pushed a commit to branch master
in repository geneagrapher.
commit 6b549beabdf8324b8e6d50138b896a9fd6c25800
Author: David Alber <alber.david at gmail.com>
Date: Sun Oct 30 22:00:34 2011 -0700
Added test for extracting information from record with no descendants.
---
tests/test_grabber_methods.py | 21 +++++++++++++++++----
1 file changed, 17 insertions(+), 4 deletions(-)
diff --git a/tests/test_grabber_methods.py b/tests/test_grabber_methods.py
index e77fa86..77eafa2 100644
--- a/tests/test_grabber_methods.py
+++ b/tests/test_grabber_methods.py
@@ -59,7 +59,20 @@ class TestGrabberMethods(unittest.TestCase):
self.assertEquals(advisors, [])
self.assertEquals(descendents, [127946])
- def test006_extract_info_no_year(self):
+ def test006_extract_info_no_descendants(self):
+ # Test the extract_node_information() method for a record with no
+ # descendants.
+
+ # This is currently identical to the extract_info_no_year test.
+ grabber = Grabber(53658)
+ [name, institution, year, advisors, descendents] = grabber.extract_node_information()
+ self.assertEquals(name, u"S. Cingolani")
+ self.assertEquals(institution, u"Scuola Normale Superiore di Pisa")
+ self.assertEquals(year, None)
+ self.assertEquals(advisors, [51261])
+ self.assertEquals(descendents, [])
+
+ def test007_extract_info_no_year(self):
# Test the extract_node_information() method for a record with no year.
# This example also has no descendents.
grabber = Grabber(53658)
@@ -70,7 +83,7 @@ class TestGrabberMethods(unittest.TestCase):
self.assertEquals(advisors, [51261])
self.assertEquals(descendents, [])
- def test007_extract_info_no_inst(self):
+ def test008_extract_info_no_inst(self):
# Test the extract_node_information() method for a record with no institution.
# This test is also missing additional information already tested.
grabber = Grabber(52965)
@@ -82,7 +95,7 @@ class TestGrabberMethods(unittest.TestCase):
self.assertEquals(descendents, [52996])
# Tests for special (from my point of view) characters:
- def test008_slash_l(self):
+ def test009_slash_l(self):
# Test the extract_node_information() method for a record
# containing a slash l character. Example:
# http://www.genealogy.math.ndsu.nodak.edu/id.php?id=7383.
@@ -93,7 +106,7 @@ class TestGrabberMethods(unittest.TestCase):
self.assertEquals(year, 1911)
self.assertEquals(advisors, [7298])
- def test009_multiple_advisors(self):
+ def test010_multiple_advisors(self):
# Test for multiple advisors.
grabber = Grabber(19964)
[name, institution, year, advisors, descendents] = grabber.extract_node_information()
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/geneagrapher.git
More information about the debian-science-commits
mailing list