Exemplo n.º 1
0
def test_EXISTENCE_has_extra_sanity_checks():
    """
        Verify that 'has_extra_sanity_checks' exists.
        An exception should be thrown if a config object cannot be obtained.
    """
    config = get_active_config()
    assert "has_extra_sanity_checks" in dir(config)
Exemplo n.º 2
0
def test_EXISTENCE_has_extra_sanity_checks():
    """
        Verify that 'has_extra_sanity_checks' exists.
        An exception should be thrown if a config object cannot be obtained.
    """
    config = get_active_config()
    assert "has_extra_sanity_checks" in dir(config)
Exemplo n.º 3
0
def test_WRONGETYPE_set_number_of_threads():
    config = get_active_config()
    try:
        config.set_number_of_threads("a")
        assert 0, "Shouldn't be able to set the number of threads to a letter"
    except TypeError, err:
        print str(err)
Exemplo n.º 4
0
def test_WRONGETYPE_set_number_of_threads():
    config = get_active_config()
    try:
        config.set_number_of_threads("a")
        assert 0, "Shouldn't be able to set the number of threads to a letter"
    except TypeError, err:
        print str(err)
Exemplo n.º 5
0
def test_WRONGTYPE_set_reads_input_buffer():
    config = get_active_config()
    try:
        config.set_reads_input_buffer_size("a")
        assert 0, ("Shouldn't be able to set the reads input buffer size to a "
                   "letter")
    except TypeError, err:
        print str(err)
Exemplo n.º 6
0
def test_WRONGTYPE_set_reads_input_buffer():
    config = get_active_config()
    try:
        config.set_reads_input_buffer_size("a")
        assert 0, ("Shouldn't be able to set the reads input buffer size to a "
                   "letter")
    except TypeError, err:
        print str(err)
Exemplo n.º 7
0
def test_EXISTENCE_OTHERS():
    """
        Verify that all of the various attributes exist.
    """
    config = get_active_config()
    for attr_name in \
        ["set_number_of_threads", "get_number_of_threads",
            "get_reads_input_buffer_size", "set_reads_input_buffer_size", ]:
        yield check_attribute_exists, config, attr_name
Exemplo n.º 8
0
def test_USE_set_reads_input_buffer_size():
    """
        Verify that the reads file chunk size is what is reported.
    """
    config = get_active_config()
    bufsz = config.get_reads_input_buffer_size()
    config.set_reads_input_buffer_size(123456789L)
    assert 123456789L == config.get_reads_input_buffer_size()
    config.set_reads_input_buffer_size(bufsz)
    assert bufsz == config.get_reads_input_buffer_size()
Exemplo n.º 9
0
def test_USE_set_number_of_threads():
    """
        Verify that the number of threads set is what is reported.
    """
    config = get_active_config()
    tnum = config.get_number_of_threads()
    config.set_number_of_threads(8)
    assert 8 == config.get_number_of_threads()
    config.set_number_of_threads(tnum)
    assert tnum == config.get_number_of_threads()
Exemplo n.º 10
0
def test_USE_set_reads_input_buffer_size():
    """
        Verify that the reads file chunk size is what is reported.
    """
    config = get_active_config()
    bufsz = config.get_reads_input_buffer_size()
    config.set_reads_input_buffer_size(123456789L)
    assert 123456789L == config.get_reads_input_buffer_size()
    config.set_reads_input_buffer_size(bufsz)
    assert bufsz == config.get_reads_input_buffer_size()
Exemplo n.º 11
0
def test_USE_set_number_of_threads():
    """
        Verify that the number of threads set is what is reported.
    """
    config = get_active_config()
    tnum = config.get_number_of_threads()
    config.set_number_of_threads(8)
    assert 8 == config.get_number_of_threads()
    config.set_number_of_threads(tnum)
    assert tnum == config.get_number_of_threads()