Beispiel #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)
Beispiel #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)
Beispiel #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)
Beispiel #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)
Beispiel #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)
Beispiel #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)
Beispiel #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
Beispiel #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()
Beispiel #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()
Beispiel #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()
Beispiel #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()