Esempio n. 1
0
def test_fastq_quality_offset_causes_outside_ascii_range_raises_error():
    min_score = 100
    max_score = 101
    offset = 200
    with pytest.raises(ValueError):
        minimal(fastq_quality(min_score=min_score, max_score=max_score))
Esempio n. 2
0
def test_fastq_quality_smallest_example():
    actual = minimal(fastq_quality())
    expected = ""

    assert actual == expected
Esempio n. 3
0
def test_fastq_quality_min_score_larger_than_max_score_raises_error():
    min_score = 10
    max_score = 9
    with pytest.raises(errors.InvalidArgument):
        minimal(fastq_quality(min_score=min_score, max_score=max_score))
Esempio n. 4
0
def test_fastq_quality_size_three_with_one_quality_score_and_sanger_offset():
    actual = minimal(fastq_quality(size=3, min_score=5, max_score=5,
                                   offset=33))
    expected = "&&&"

    assert actual == expected
Esempio n. 5
0
def test_fastq_quality_size_three_with_one_quality_score():
    actual = minimal(fastq_quality(size=3, min_score=5, max_score=5))
    expected = "EEE"

    assert actual == expected
Esempio n. 6
0
def test_fastq_quality_smallest_non_empty_with_default_ascii():
    actual = minimal(fastq_quality(size=1))
    expected = "@"

    assert actual == expected
Esempio n. 7
0
def test_fastq_quality_smallest_non_empty_with_default_ascii():
    actual = minimal(fastq_quality(size=1))
    expected = "0"  # for some reason hypothesis shrinks towards 0 for unicodes

    assert actual == expected