# Path: hgvs/exceptions.py
# class HGVSError(Exception):
#     pass
# 
# class HGVSDataNotAvailableError(HGVSError):
#     pass
# 
# class HGVSParseError(HGVSError):
#     pass
# 
# class HGVSInvalidVariantError(HGVSError):
#     """Exception raised when variant is inconsistent or invalid"""
#     pass
# 
# Path: hgvs/enums.py



import logging
import pprint
import re
import sys
import os
import unittest
import pytest
import hgvs.assemblymapper
import hgvs.dataproviders.uta
import hgvs.normalizer
import hgvs.parser
import hgvs.sequencevariant
import hgvs.alignmentmapper
import hgvs.validator
import hgvs.variantmapper
from hgvs.exceptions import HGVSError, HGVSDataNotAvailableError, HGVSParseError, HGVSInvalidVariantError
from hgvs.enums import Datum
from support import CACHE
        self.assertEqual(str(v), str(v2))    # no change after roundtrip

    def test_325_3p_UTR_treated_as_intronic(self):
        v = self.hp.parse_hgvs_variant("NM_000023.2:c.*6C>T")
        self.assertTrue(self.hv.validate(v))

    def test_326_handle_variants_in_par(self):
        "For a variant in the PAR, allow user user choose preference"
        hgvs_c = "NM_000451.3:c.584G>A"
        var_c = self.hp.parse_hgvs_variant(hgvs_c)

        self.am37.in_par_assume = None
        with self.assertRaises(HGVSError):
            var_g = self.am37.c_to_g(var_c)

        self.am37.in_par_assume = 'X'
        self.assertEqual(self.am37.c_to_g(var_c).ac, "NC_000023.10")

        self.am37.in_par_assume = 'Y'
        self.assertEqual(self.am37.c_to_g(var_c).ac, "NC_000024.9")

        self.am37.in_par_assume = None

    def test_330_incorrect_end_datum_post_ter(self):
        # https://github.com/biocommons/hgvs/issues/330/
        # In a variant like NM_004006.2:c.*87_91del, the interval
        # start and end are parsed independently. The * binds to
        # start but not end, causing end to have an incorrect datum.
        v = self.hp.parse_hgvs_variant("NM_004006.2:c.*87_91del")
        self.assertEqual(v.posedit.pos.start.datum, Datum.CDS_END)

# Path: hgvs/exceptions.py
# class HGVSError(Exception):
#     pass
# 
# class HGVSDataNotAvailableError(HGVSError):
#     pass
# 
# class HGVSParseError(HGVSError):
#     pass
# 
# class HGVSInvalidVariantError(HGVSError):
#     """Exception raised when variant is inconsistent or invalid"""
#     pass
# 
# Path: hgvs/enums.py



# Path: tests/test_issues_03xx.py
import logging
import pprint
import re
import sys
import os
import unittest
import pytest
import hgvs.assemblymapper
import hgvs.dataproviders.uta
import hgvs.normalizer
import hgvs.parser
import hgvs.sequencevariant
import hgvs.alignmentmapper
import hgvs.validator
import hgvs.variantmapper
from hgvs.exceptions import HGVSError, HGVSDataNotAvailableError, HGVSParseError, HGVSInvalidVariantError
from hgvs.enums import Datum
from support import CACHE

        self.assertEqual(str(v), str(v2))    # no change after roundtrip

    def test_325_3p_UTR_treated_as_intronic(self):
        v = self.hp.parse_hgvs_variant("NM_000023.2:c.*6C>T")
        self.assertTrue(self.hv.validate(v))

    def test_326_handle_variants_in_par(self):
        "For a variant in the PAR, allow user user choose preference"
        hgvs_c = "NM_000451.3:c.584G>A"
        var_c = self.hp.parse_hgvs_variant(hgvs_c)

        self.am37.in_par_assume = None
        with self.assertRaises(HGVSError):
            var_g = self.am37.c_to_g(var_c)

        self.am37.in_par_assume = 'X'
        self.assertEqual(self.am37.c_to_g(var_c).ac, "NC_000023.10")

        self.am37.in_par_assume = 'Y'
        self.assertEqual(self.am37.c_to_g(var_c).ac, "NC_000024.9")

        self.am37.in_par_assume = None

    def test_330_incorrect_end_datum_post_ter(self):
        # https://github.com/biocommons/hgvs/issues/330/
        # In a variant like NM_004006.2:c.*87_91del, the interval
        # start and end are parsed independently. The * binds to
        # start but not end, causing end to have an incorrect datum.
        v = self.hp.parse_hgvs_variant("NM_004006.2:c.*87_91del")
        self.assertEqual(v.posedit.pos.start.datum, Datum.CDS_END)

        self.assertEqual(v.posedit.pos.end.datum, Datum.CDS_END)