-
Notifications
You must be signed in to change notification settings - Fork 238
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
RR: #13045 RR: #13046 Support symmetric comparison of structs and struct expressions. Provide better error messages when attempting to construct literals from expressions with free variables.
- Loading branch information
Showing
10 changed files
with
81 additions
and
27 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
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
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
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
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 |
---|---|---|
@@ -1,14 +1,17 @@ | ||
import unittest | ||
|
||
from hail.genetics import Locus | ||
import hail as hl | ||
from hail.genetics import * | ||
from ..helpers import * | ||
|
||
class Tests(unittest.TestCase): | ||
def test_constructor(): | ||
l = Locus.parse('1:100') | ||
|
||
assert l == Locus('1', 100) | ||
assert l == Locus(1, 100) | ||
assert l.reference_genome == hl.default_reference() | ||
|
||
|
||
def test_constructor(self): | ||
l = Locus.parse('1:100') | ||
def test_call_rich_comparison(): | ||
val = Locus(1, 1) | ||
expr = hl.locus('1', 1) | ||
|
||
self.assertEqual(l, Locus('1', 100)) | ||
self.assertEqual(l, Locus(1, 100)) | ||
self.assertEqual(l.reference_genome, hl.default_reference()) | ||
assert hl.eval(val == expr) | ||
assert hl.eval(expr == val) |
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