File: test.tst

package info (click to toggle)
pyke 1.1.1-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 4,196 kB
  • ctags: 1,159
  • sloc: python: 12,866; sh: 446; xml: 203; sql: 39; makefile: 5
file content (33 lines) | stat: -rw-r--r-- 938 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# test.tst

    >>> from Test import test
    >>> import Test.first
    >>> from Test.first import family
    >>> test.init(family.__file__)
    >>> family.init(test.Engine)

    son_of('art', 'art2', 'nana')
    son_of('artie', 'art', 'kathleen')
    son_of('ed', 'art', 'kathleen')
    son_of('david', 'art', 'kathleen')
    son_of('justin', 'artie', 'julie')
    son_of('arthur', 'artie', 'lisa')
    son_of('keith', 'ed', 'ann')
    son_of('ramon', 'ed', 'ann')
    son_of('cody', 'david', 'colleen')

    >>> test.Engine.get_kb('family').dump_specific_facts()

    >>> test.fc_test('test')

    >>> test.Engine.get_kb('family').dump_specific_facts()
    brothers('artie', 'ed')
    brothers('ed', 'artie')
    brothers('david', 'artie')
    brothers('keith', 'ramon')
    brothers('ramon', 'keith')
    cousins('justin', 'keith')
    cousins('keith', 'justin')
    cousins('cody', 'justin')
    nephew_of('keith', 'artie', 'julie')