elitcloud / elit

🔠 Evolution of Language and Information Technology
https://elit.cloud
Other
47 stars 7 forks source link

Unit tests #1

Closed jdchoi77 closed 7 years ago

jdchoi77 commented 7 years ago

Unit tests:

Reader example:

filename = '../../resources/sample.tsv'
reader = TSVReader(filename, 1, 2, 3, 4, 5, 6, 7, 8)

# read the next graph
graph = reader.next()
print(str(graph)+'\n')

# read the rest
for graph in reader:
    print(str(graph)+'\n')
tlee54 commented 7 years ago

elit.structure

  1. parent of: I think the name is counter-intuitive
  2. set_parent: setting a parent of a node that already has a parent fails with exception.
  3. rightmost_child: seems to fail. not sure.
  4. leftmost_child: leftmost child of artificial root returns none? shouldn't it return the actual root?