Skip to content

Commit 1624413

Browse files
authored
Merge pull request #80 from chaimleib/dev
Dev -> master (3.0.3)
2 parents 6da2354 + 195c56c commit 1624413

File tree

3 files changed

+44
-2
lines changed

3 files changed

+44
-2
lines changed

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
import subprocess
3434

3535
## CONFIG
36-
target_version = '3.0.2'
36+
target_version = '3.0.3'
3737

3838

3939
def version_info(target_version):

test/issues/issue67_test.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
from intervaltree import IntervalTree
2626
import pytest
2727

28-
def test_interval_insersion_67():
28+
def test_interval_insertion_67():
2929
intervals = (
3030
(3657433088, 3665821696),
3131
(2415132672, 2415394816),

test/issues/issue72_test.py

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
"""
2+
intervaltree: A mutable, self-balancing interval tree for Python 2 and 3.
3+
Queries may be by point, by range overlap, or by range envelopment.
4+
5+
Test module: IntervalTree, remove_overlap caused incorrect balancing
6+
where intervals overlapping an ancestor's x_center were buried too deep.
7+
Submitted as issue #72 (KeyError raised after calling remove_overlap)
8+
by alexandersoto
9+
10+
Copyright 2013-2018 Chaim Leib Halbert
11+
12+
Licensed under the Apache License, Version 2.0 (the "License");
13+
you may not use this file except in compliance with the License.
14+
You may obtain a copy of the License at
15+
16+
http://www.apache.org/licenses/LICENSE-2.0
17+
18+
Unless required by applicable law or agreed to in writing, software
19+
distributed under the License is distributed on an "AS IS" BASIS,
20+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21+
See the License for the specific language governing permissions and
22+
limitations under the License.
23+
"""
24+
from __future__ import absolute_import
25+
from intervaltree import IntervalTree, Interval
26+
import pytest
27+
28+
def test_interval_removal_72():
29+
tree = IntervalTree([
30+
Interval(0.0, 2.588, 841),
31+
Interval(65.5, 85.8, 844),
32+
Interval(93.6, 130.0, 837),
33+
Interval(125.0, 196.5, 829),
34+
Interval(391.8, 521.0, 825),
35+
Interval(720.0, 726.0, 834),
36+
Interval(800.0, 1033.0, 850),
37+
Interval(800.0, 1033.0, 855),
38+
])
39+
tree.verify()
40+
tree.remove_overlap(0.0, 521.0)
41+
tree.verify()
42+

0 commit comments

Comments
 (0)