# 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
        #r.5+?
        cdsp.offset = None
        self.assertEqual(str(cdsp), "5+?")
        self.assertTrue(cdsp.is_intronic)

        #r.(5+?)
        cdsp.uncertain = True
        self.assertEqual(str(cdsp), "(5+?)")

        # c.*5
        cdsp = hgvs.location.BaseOffsetPosition(5, datum=Datum.CDS_END)
        self.assertEqual(cdsp.datum, Datum.CDS_END)
        self.assertEqual(cdsp.base, 5)
        self.assertEqual(cdsp.offset, 0)
        self.assertEqual(str(cdsp), "*5")

        cdsp.uncertain = True
        self.assertEqual(str(cdsp), "(*5)")

        cdsp.offset = 7
        self.assertEqual(str(cdsp), "(*5+7)")

    def test_baseoffset_subtraction(self):
        v30 = hgvs.location.BaseOffsetPosition(3, 0)
        v50 = hgvs.location.BaseOffsetPosition(5, 0)
        v52 = hgvs.location.BaseOffsetPosition(5, 2)
        v54 = hgvs.location.BaseOffsetPosition(5, 4)

        self.assertEqual(v50 - v30, 2)


# 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

        #r.5+?
        cdsp.offset = None
        self.assertEqual(str(cdsp), "5+?")
        self.assertTrue(cdsp.is_intronic)

        #r.(5+?)
        cdsp.uncertain = True
        self.assertEqual(str(cdsp), "(5+?)")

        # c.*5
        cdsp = hgvs.location.BaseOffsetPosition(5, datum=Datum.CDS_END)
        self.assertEqual(cdsp.datum, Datum.CDS_END)
        self.assertEqual(cdsp.base, 5)
        self.assertEqual(cdsp.offset, 0)
        self.assertEqual(str(cdsp), "*5")

        cdsp.uncertain = True
        self.assertEqual(str(cdsp), "(*5)")

        cdsp.offset = 7
        self.assertEqual(str(cdsp), "(*5+7)")

    def test_baseoffset_subtraction(self):
        v30 = hgvs.location.BaseOffsetPosition(3, 0)
        v50 = hgvs.location.BaseOffsetPosition(5, 0)
        v52 = hgvs.location.BaseOffsetPosition(5, 2)
        v54 = hgvs.location.BaseOffsetPosition(5, 4)

        self.assertEqual(v50 - v30, 2)


        with self.assertRaises(HGVSError):