示例#1
0
def test_set_response_statistics_string_to_tuple():
    """Test that a string is converted to a tuple."""
    x = ResponseFunctions()
    value = "x1"
    x.response_statistics = value
    assert_true(type(x.response_statistics) is tuple)
示例#2
0
def test_set_response_statistics_fails_with_nonstring_scalar():
    """Test that response_statistics fails with a non-string scalar."""
    x = ResponseFunctions()
    value = 42
    x.response_statistics = value
示例#3
0
def test_set_response_statistics():
    """Test setting the response_statistics property."""
    x = ResponseFunctions()
    for stats in [["median"], ("median", )]:
        x.response_statistics = stats
        assert_equal(x.response_statistics, stats)
示例#4
0
def setup_module():
    """Fixture called before any tests are performed."""
    print("\n*** " + __name__)
    global r
    r = ResponseFunctions()
示例#5
0
def test_set_response_files():
    """Test setting the response_files property."""
    x = ResponseFunctions()
    for files in [["HYDROASCII.QS"], ("HYDROASCII.QS", )]:
        x.response_files = files
        assert_equal(x.response_files, files)
示例#6
0
def test_instantiate():
    """Test whether ResponsesFunctions instantiates."""
    x = ResponseFunctions()