Skip to content

Commit

Permalink
Merge pull request #80 from chaimleib/dev
Browse files Browse the repository at this point in the history
Dev -> master (3.0.3)
  • Loading branch information
chaimleib authored Sep 5, 2019
2 parents 6da2354 + 195c56c commit 1624413
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 2 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
import subprocess

## CONFIG
target_version = '3.0.2'
target_version = '3.0.3'


def version_info(target_version):
Expand Down
2 changes: 1 addition & 1 deletion test/issues/issue67_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
from intervaltree import IntervalTree
import pytest

def test_interval_insersion_67():
def test_interval_insertion_67():
intervals = (
(3657433088, 3665821696),
(2415132672, 2415394816),
Expand Down
42 changes: 42 additions & 0 deletions test/issues/issue72_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
"""
intervaltree: A mutable, self-balancing interval tree for Python 2 and 3.
Queries may be by point, by range overlap, or by range envelopment.
Test module: IntervalTree, remove_overlap caused incorrect balancing
where intervals overlapping an ancestor's x_center were buried too deep.
Submitted as issue #72 (KeyError raised after calling remove_overlap)
by alexandersoto
Copyright 2013-2018 Chaim Leib Halbert
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
from __future__ import absolute_import
from intervaltree import IntervalTree, Interval
import pytest

def test_interval_removal_72():
tree = IntervalTree([
Interval(0.0, 2.588, 841),
Interval(65.5, 85.8, 844),
Interval(93.6, 130.0, 837),
Interval(125.0, 196.5, 829),
Interval(391.8, 521.0, 825),
Interval(720.0, 726.0, 834),
Interval(800.0, 1033.0, 850),
Interval(800.0, 1033.0, 855),
])
tree.verify()
tree.remove_overlap(0.0, 521.0)
tree.verify()

0 comments on commit 1624413

Please sign in to comment.