-
-
Notifications
You must be signed in to change notification settings - Fork 399
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1082 from ioam/hline_fix
Fixed HLine dimension_values
- Loading branch information
Showing
2 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import numpy as np | ||
|
||
from holoviews import Image, HLine, VLine | ||
from holoviews.element.comparison import ComparisonTestCase | ||
|
||
class AnnotationTests(ComparisonTestCase): | ||
""" | ||
Tests allowable data formats when constructing | ||
the basic Element types. | ||
""" | ||
|
||
def test_hline_dimension_values(self): | ||
hline = HLine(0) | ||
self.assertEqual(hline.range(0), (None, None)) | ||
self.assertEqual(hline.range(1), (0, 0)) | ||
|
||
def test_vline_dimension_values(self): | ||
hline = VLine(0) | ||
self.assertEqual(hline.range(0), (0, 0)) | ||
self.assertEqual(hline.range(1), (None, None)) |