Skip to content
Snippets Groups Projects
Commit 36474d3f authored by Kathleen Moriarty's avatar Kathleen Moriarty
Browse files

added: test for length of read

parent e129ca78
Branches
No related tags found
1 merge request!17Issue 7
Pipeline #13806 passed
......@@ -11,12 +11,13 @@ from src.read_sequencing import read_sequencing
def test_read_sequencing(tmpdir):
"""Tests the correct number of reads were generated."""
"""Tests the correct number of reads were generated and the correct length of reads."""
read_sequencing(
frag_file_name=Path.cwd() / 'tests/resources/test_terminal_fragments.txt',
num_reads=80,
read_len=10,
num_reads=10,
read_len=80,
output_file_name=tmpdir / 'reads.txt'
)
df_out = pd.read_table(tmpdir / 'reads.txt', header=None)
assert df_out.shape[0] == 80 * 2
assert df_out.shape[0] == 10 * 2
assert len(df_out.iloc[lambda x: x.index % 2 == 1, 0][1]) == 80
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment