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


import unittest
import pytest
import hgvs
import hgvs.alignmentmapper
import hgvs.variantmapper
from hgvs.exceptions import HGVSInvalidVariantError
    from hgvs.easy import *
        assert str(s1_g) == "NC_000009.11:g.35658015C>A"
        assert self.s1_n == self.am37.g_to_n(s1_g, self.s1_n.ac)

        e1_g = self.am37.n_to_g(self.e1_n)
        assert str(e1_g) == "NC_000009.11:g.35657748A>G"
        assert self.e1_n == self.am37.g_to_n(e1_g, self.e1_n.ac)

        # Disable bounds checking and retry
        hgvs.global_config.mapping.strict_bounds = False

        s2_g = self.am37.n_to_g(self.s2_n)
        assert str(s2_g) == "NC_000009.11:g.35658016A>G"
        assert s2_g.posedit.pos.start.base - s1_g.posedit.pos.start.base == 1
        #BUG: assert self.s2_n == self.am37.g_to_n(s2_g, self.s2_n.ac)

        e2_g = self.am37.n_to_g(self.e2_n)
        assert str(e2_g) == "NC_000009.11:g.35657747A>G"
        assert e2_g.posedit.pos.start.base - e1_g.posedit.pos.start.base == -1
        #BUG: assert self.e2_n == self.am37.g_to_n(e2_g, self.e2_n.ac)

        hgvs.global_config.mapping.strict_bounds = True

    def test_enforce_strict_bounds(self):
        """Ensure that an exception is raised when outside bounds"""

        # TODO: These exceptions are raised, but with the wrong message
        # use `match=` arg
        with pytest.raises(HGVSInvalidVariantError):
            s2_g = self.am37.n_to_g(self.s2_n)


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


# Path: tests/issues/test_437.py
import unittest
import pytest
import hgvs
import hgvs.alignmentmapper
import hgvs.variantmapper
from hgvs.exceptions import HGVSInvalidVariantError
    from hgvs.easy import *

        assert str(s1_g) == "NC_000009.11:g.35658015C>A"
        assert self.s1_n == self.am37.g_to_n(s1_g, self.s1_n.ac)

        e1_g = self.am37.n_to_g(self.e1_n)
        assert str(e1_g) == "NC_000009.11:g.35657748A>G"
        assert self.e1_n == self.am37.g_to_n(e1_g, self.e1_n.ac)

        # Disable bounds checking and retry
        hgvs.global_config.mapping.strict_bounds = False

        s2_g = self.am37.n_to_g(self.s2_n)
        assert str(s2_g) == "NC_000009.11:g.35658016A>G"
        assert s2_g.posedit.pos.start.base - s1_g.posedit.pos.start.base == 1
        #BUG: assert self.s2_n == self.am37.g_to_n(s2_g, self.s2_n.ac)

        e2_g = self.am37.n_to_g(self.e2_n)
        assert str(e2_g) == "NC_000009.11:g.35657747A>G"
        assert e2_g.posedit.pos.start.base - e1_g.posedit.pos.start.base == -1
        #BUG: assert self.e2_n == self.am37.g_to_n(e2_g, self.e2_n.ac)

        hgvs.global_config.mapping.strict_bounds = True

    def test_enforce_strict_bounds(self):
        """Ensure that an exception is raised when outside bounds"""

        # TODO: These exceptions are raised, but with the wrong message
        # use `match=` arg
        with pytest.raises(HGVSInvalidVariantError):
            s2_g = self.am37.n_to_g(self.s2_n)


        with pytest.raises(HGVSInvalidVariantError):