Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CSCI30_Project
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Temujin
CSCI30_Project
Commits
2c60a6d3
Commit
2c60a6d3
authored
Dec 11, 2019
by
Temujin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added some tests
parent
fc4afe66
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
0 deletions
+34
-0
ft_test.py
tests/ft_test.py
+34
-0
No files found.
tests/ft_test.py
View file @
2c60a6d3
...
@@ -4,7 +4,41 @@ import unittest
...
@@ -4,7 +4,41 @@ import unittest
class
TestFamilyTree
(
unittest
.
TestCase
):
class
TestFamilyTree
(
unittest
.
TestCase
):
def
setUp
(
self
):
def
setUp
(
self
):
r"""For testing.
A
/
\
B C
/
\
D E
"""
self
.
ftree
=
c
.
FamilyTree
()
self
.
ftree
=
c
.
FamilyTree
()
ftree
=
c
.
FamilyTree
()
A
=
c
.
Person
(
"A"
,
69
,
True
)
B
=
c
.
Person
(
"B"
,
69
,
True
)
C
=
c
.
Person
(
"C"
,
69
,
False
)
D
=
c
.
Person
(
"D"
,
69
,
True
)
E
=
c
.
Person
(
"E"
,
666
,
False
)
ftree
.
insert_person
(
A
)
ftree
.
insert_person
(
B
)
ftree
.
insert_person
(
C
)
ftree
.
insert_person
(
D
)
ftree
.
insert_person
(
E
)
B
.
set_parent
(
A
)
C
.
set_parent
(
A
)
D
.
set_parent
(
B
)
E
.
set_parent
(
B
)
ftree
.
find_root
()
def
test_find_ancestors
(
self
):
pass
def
test_find_descendants
(
self
):
pass
def
test_set_generations
(
self
):
pass
def
test_relationship
(
self
):
if
__name__
==
"__main__"
:
if
__name__
==
"__main__"
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment