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


import os
import unittest
import pytest
import hgvs.dataproviders.uta
import hgvs.parser
import hgvs.variantmapper
from hgvs.exceptions import HGVSError, HGVSInvalidVariantError
from support import CACHE
        with self.assertRaises(hgvs.exceptions.HGVSUsageError):
            var_c = self.vm.c_to_n(var_c)    # c_to_n: var_c is bogus

    def test_map_var_of_unsupported_validation(self):
        hgvs_c = "NM_003777.3:c.13552_*36del57"
        var_c = self.hp.parse_hgvs_variant(hgvs_c)
        var_g = self.vm.c_to_g(var_c, "NC_000007.13")
        self.assertEqual(str(var_g), "NC_000007.13:g.21940852_21940908del")

    def test_map_to_unknown_p_effect(self):
        hgvs_c = "NM_020975.4:c.625+9C>T"
        var_c = self.hp.parse_hgvs_variant(hgvs_c)
        var_p = self.vm.c_to_p(var_c)
        self.assertEqual(str(var_p), "NP_066124.1:p.?")

    def test_map_of_c_out_of_cds_bound(self):
        hgvs_c = "NM_145901.2:c.343T>C"
        var_c = self.hp.parse_hgvs_variant(hgvs_c)
        with self.assertRaises(HGVSInvalidVariantError):
            self.vm.c_to_p(var_c)

    def test_map_of_dup_at_cds_end(self):
        hgvs_c = "NM_001051.2:c.1257dupG"
        var_c = self.hp.parse_hgvs_variant(hgvs_c)
        var_p = self.vm.c_to_p(var_c)
        self.assertEqual(str(var_p), "NP_001042.1:p.(=)")

    def test_map_of_c_out_of_reference_bound(self):
        hgvs_c = "NM_000249.3:c.-73960_*46597del"
        var_c = self.hp.parse_hgvs_variant(hgvs_c)

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


# Path: tests/test_hgvs_variantmapper.py
import os
import unittest
import pytest
import hgvs.dataproviders.uta
import hgvs.parser
import hgvs.variantmapper
from hgvs.exceptions import HGVSError, HGVSInvalidVariantError
from support import CACHE

        with self.assertRaises(hgvs.exceptions.HGVSUsageError):
            var_c = self.vm.c_to_n(var_c)    # c_to_n: var_c is bogus

    def test_map_var_of_unsupported_validation(self):
        hgvs_c = "NM_003777.3:c.13552_*36del57"
        var_c = self.hp.parse_hgvs_variant(hgvs_c)
        var_g = self.vm.c_to_g(var_c, "NC_000007.13")
        self.assertEqual(str(var_g), "NC_000007.13:g.21940852_21940908del")

    def test_map_to_unknown_p_effect(self):
        hgvs_c = "NM_020975.4:c.625+9C>T"
        var_c = self.hp.parse_hgvs_variant(hgvs_c)
        var_p = self.vm.c_to_p(var_c)
        self.assertEqual(str(var_p), "NP_066124.1:p.?")

    def test_map_of_c_out_of_cds_bound(self):
        hgvs_c = "NM_145901.2:c.343T>C"
        var_c = self.hp.parse_hgvs_variant(hgvs_c)
        with self.assertRaises(HGVSInvalidVariantError):
            self.vm.c_to_p(var_c)

    def test_map_of_dup_at_cds_end(self):
        hgvs_c = "NM_001051.2:c.1257dupG"
        var_c = self.hp.parse_hgvs_variant(hgvs_c)
        var_p = self.vm.c_to_p(var_c)
        self.assertEqual(str(var_p), "NP_001042.1:p.(=)")

    def test_map_of_c_out_of_reference_bound(self):
        hgvs_c = "NM_000249.3:c.-73960_*46597del"
        var_c = self.hp.parse_hgvs_variant(hgvs_c)

        with pytest.raises(HGVSError, match='coordinate is out of bounds'):