# Path: hgvs/exceptions.py
# class HGVSError(Exception):
#     pass
# 
# class HGVSUnsupportedOperationError(HGVSError):
#     pass
# 
# Path: hgvs/enums.py



import unittest
import pytest
import hgvs.location
import hgvs.parser
from hgvs.exceptions import HGVSError, HGVSUnsupportedOperationError
from hgvs.enums import Datum
    def test_aaposition_subtraction(self):
        l1 = hgvs.location.AAPosition(15, 'S')
        l2 = hgvs.location.AAPosition(20, 'S')
        self.assertEqual(l2 - l1, 5)

    def test_aaposition_comparision(self):
        var = self.hp.parse_hgvs_variant("NP_000042.3:p.His1082_Val1085delinsLeuHisGlnAla")
        self.assertTrue(var.posedit.pos.start < var.posedit.pos.end)
        self.assertFalse(var.posedit.pos.start > var.posedit.pos.end)

        var = self.hp.parse_hgvs_variant("NP_000042.3:p.His1082ArgfsTer2")
        self.assertFalse(var.posedit.pos.start < var.posedit.pos.end)
        self.assertFalse(var.posedit.pos.start > var.posedit.pos.end)


@pytest.mark.quick
class Test_Interval(unittest.TestCase):
    def test_Interval(self):
        ival = hgvs.location.Interval(
            hgvs.location.BaseOffsetPosition(base=12, offset=+34),
            hgvs.location.BaseOffsetPosition(base=56, offset=-78))
        self.assertEqual(ival.start.base, 12)
        self.assertEqual(ival.start.offset, 34)
        self.assertEqual(ival.end.base, 56)
        self.assertEqual(ival.end.offset, -78)
        self.assertEqual(str(ival), "12+34_56-78")

    def test_length(self):
        ival = hgvs.location.Interval(
            hgvs.location.BaseOffsetPosition(base=12, offset=0),

# Path: hgvs/exceptions.py
# class HGVSError(Exception):
#     pass
# 
# class HGVSUnsupportedOperationError(HGVSError):
#     pass
# 
# Path: hgvs/enums.py



# Path: tests/test_hgvs_location.py
import unittest
import pytest
import hgvs.location
import hgvs.parser
from hgvs.exceptions import HGVSError, HGVSUnsupportedOperationError
from hgvs.enums import Datum

    def test_aaposition_subtraction(self):
        l1 = hgvs.location.AAPosition(15, 'S')
        l2 = hgvs.location.AAPosition(20, 'S')
        self.assertEqual(l2 - l1, 5)

    def test_aaposition_comparision(self):
        var = self.hp.parse_hgvs_variant("NP_000042.3:p.His1082_Val1085delinsLeuHisGlnAla")
        self.assertTrue(var.posedit.pos.start < var.posedit.pos.end)
        self.assertFalse(var.posedit.pos.start > var.posedit.pos.end)

        var = self.hp.parse_hgvs_variant("NP_000042.3:p.His1082ArgfsTer2")
        self.assertFalse(var.posedit.pos.start < var.posedit.pos.end)
        self.assertFalse(var.posedit.pos.start > var.posedit.pos.end)


@pytest.mark.quick
class Test_Interval(unittest.TestCase):
    def test_Interval(self):
        ival = hgvs.location.Interval(
            hgvs.location.BaseOffsetPosition(base=12, offset=+34),
            hgvs.location.BaseOffsetPosition(base=56, offset=-78))
        self.assertEqual(ival.start.base, 12)
        self.assertEqual(ival.start.offset, 34)
        self.assertEqual(ival.end.base, 56)
        self.assertEqual(ival.end.offset, -78)
        self.assertEqual(str(ival), "12+34_56-78")

    def test_length(self):
        ival = hgvs.location.Interval(
            hgvs.location.BaseOffsetPosition(base=12, offset=0),

            hgvs.location.BaseOffsetPosition(base=50, offset=0))