Skip to content

Commit

Permalink
edit: add parent argument to Interval and Point declarations
Browse files Browse the repository at this point in the history
  • Loading branch information
rolandomunoz committed Nov 21, 2022
1 parent 8b82b8c commit eaea37e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion tests/test_interval_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@
mytextgrid_path = str(pathlib.Path(__file__).parent.parent.joinpath('src'))
sys.path.insert(0, mytextgrid_path)
from mytextgrid.core.interval_tier import Interval
from mytextgrid.core.interval_tier import IntervalTier

class TestInterval(unittest.TestCase):

def test_init(self):
start = Decimal('5.145')
end = Decimal('6.324')
interval = Interval(start, end, 'perro')
interval = Interval(IntervalTier(), start, end, 'perro')

self.assertEqual(interval.xmin, start)
self.assertEqual(interval.xmax, end)
Expand Down
3 changes: 2 additions & 1 deletion tests/test_point_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
mytextgrid_path = str(pathlib.Path(__file__).parent.parent.joinpath('src'))
sys.path.insert(0, mytextgrid_path)
from mytextgrid.core.point_tier import Point
from mytextgrid.core.point_tier import PointTier
getcontext().prec = 16

class Testpoint(unittest.TestCase):
Expand All @@ -14,7 +15,7 @@ class Testpoint(unittest.TestCase):
"""
def setUp(self):
time = Decimal('5.145')
self.point = Point(time, 'H')
self.point = Point(PointTier(), time, 'H')

def test_init(self):
point = self.point
Expand Down

0 comments on commit eaea37e

Please sign in to comment.