Example #1
0
def test__sanity_check_input():
    test_subject = OpenCADCCutout()
    input = '[9][100:1000]'

    sanity_input = test_subject._sanity_check_input(input)
    assert isinstance(sanity_input, list), 'Should be list'

    with pytest.raises(ValueError) as ve:
        test_subject._sanity_check_input(('bad', 'tuple'))
        assert ('{}'.format(ve) ==
                'Input is expected to be a string or list but was \
(u\'bad\', u\'tuple\')'                       ) or ('{}'.format(ve) ==
                             'Input is expected to be a string or list but was \
(\'bad\', \'tuple\')'                     ), \
            'Wrong error message.'
Example #2
0
def test__sanity_check_input():
    test_subject = OpenCADCCutout()
    input = '[9][100:1000]'

    sanity_input = test_subject._sanity_check_input(input)

    assert isinstance(sanity_input, list), 'Should be list'