# Path: xclib/check.py
# def assertEqual(a, b):
#     if type(a) == type(b):
#         assertSimilar(a, b)
#     else:
#         raise AssertionError('Assertion failed: Type mismatch %r (%s) != %r (%s)' % (a, type(a), b, type(b)))
# 
# def assertSimilar(a, b):
#     if a != b:
#         raise AssertionError('Assertion failed: Value mismatch: %r (%s) != %r (%s)' % (a, type(a), b, type(b)))


from xclib.check import assertEqual, assertSimilar

def test_assert_equal_type_fail():
    try:
        assertEqual(b'Hallo', u'Hallo')
    except AssertionError:
        return
    raise AssertionError('Should have raised an exception')

def test_assert_equal_type_fail2():
    try:
        assertEqual(int(3), float(3))
    except AssertionError:
        return
    raise AssertionError('Should have raised an exception')

def test_assert_equal_value_fail():
    try:
        assertEqual(u'Hallo', u'Tschüss')
    except AssertionError:
        return
    raise AssertionError('Should have raised an exception')

def test_assert_similar_type_success():
    assertSimilar(u'Hallo', u'Hallo')

def test_assert_similar_type_mismatch():
    assertSimilar(int(3), float(3))

def test_assert_equal_value_fail():
    try:

# Path: xclib/check.py
# def assertEqual(a, b):
#     if type(a) == type(b):
#         assertSimilar(a, b)
#     else:
#         raise AssertionError('Assertion failed: Type mismatch %r (%s) != %r (%s)' % (a, type(a), b, type(b)))
# 
# def assertSimilar(a, b):
#     if a != b:
#         raise AssertionError('Assertion failed: Value mismatch: %r (%s) != %r (%s)' % (a, type(a), b, type(b)))


# Path: xclib/tests/00_check_test.py
from xclib.check import assertEqual, assertSimilar


def test_assert_equal_type_fail():
    try:
        assertEqual(b'Hallo', u'Hallo')
    except AssertionError:
        return
    raise AssertionError('Should have raised an exception')

def test_assert_equal_type_fail2():
    try:
        assertEqual(int(3), float(3))
    except AssertionError:
        return
    raise AssertionError('Should have raised an exception')

def test_assert_equal_value_fail():
    try:
        assertEqual(u'Hallo', u'Tschüss')
    except AssertionError:
        return
    raise AssertionError('Should have raised an exception')

def test_assert_similar_type_success():
    assertSimilar(u'Hallo', u'Hallo')

def test_assert_similar_type_mismatch():
    assertSimilar(int(3), float(3))

def test_assert_equal_value_fail():
    try:

        assertSimilar(int(3), float(4))