@pytest.mark.parametrize('size', list(range(18, 20)))
@pytest.mark.parametrize('index', list(range(1, 7, 2)))
@pytest.mark.parametrize('version', [1, 2, 3])
@pytest.mark.parametrize('ext', ['.mkv', '.rar', '.r00', '.mp3'])
def test_singlefile(size, ext, index, version, wind):
    'Test the singlefile for create and check tabs.'
    (window, _) = wind
    createtab = window.central.createWidget
    checktab = window.central.checkWidget
    window.central.setCurrentWidget(checktab)
    testfile = str(tempfile(exp=size))
    tfile = (testfile + ext)
    os.rename(testfile, tfile)
    metafile = (tfile + '.torrent')
    createtab.path_input.clear()
    createtab.output_input.clear()
    createtab.browse_file_button.browse(tfile)
    createtab.output_input.setText(metafile)
    createtab.piece_length.setCurrentIndex(index)
    btns = [createtab.v1button, createtab.v2button, createtab.hybridbutton]
    for (i, btn) in enumerate(btns):
        if ((i + 1) == version):
            btn.click()
            break
    createtab.submit_button.click()
    createtab.submit_button.join()
    checktab.fileInput.clear()
    checktab.searchInput.clear()
    checktab.fileInput.setText(metafile)
    checktab.searchInput.setText(tfile)
    checktab.checkButton.click()
    ptext = checktab.textEdit.toPlainText()
    assert ('100%' in ptext)
    rmpath(tfile, metafile)
Test the singlefile for create and check tabs.
@pytest.mark.parametrize('size', list(range(18, 20)))
@pytest.mark.parametrize('index', list(range(1, 7, 2)))
@pytest.mark.parametrize('version', [1, 2, 3])
@pytest.mark.parametrize('ext', ['.mkv', '.rar', '.r00', '.mp3'])
def test_singlefile(size, ext, index, version, wind):
    
    (window, _) = wind
    createtab = window.central.createWidget
    checktab = window.central.checkWidget
    window.central.setCurrentWidget(checktab)
    testfile = str(tempfile(exp=size))
    tfile = (testfile + ext)
    os.rename(testfile, tfile)
    metafile = (tfile + '.torrent')
    createtab.path_input.clear()
    createtab.output_input.clear()
    createtab.browse_file_button.browse(tfile)
    createtab.output_input.setText(metafile)
    createtab.piece_length.setCurrentIndex(index)
    btns = [createtab.v1button, createtab.v2button, createtab.hybridbutton]
    for (i, btn) in enumerate(btns):
        if ((i + 1) == version):
            btn.click()
            break
    createtab.submit_button.click()
    createtab.submit_button.join()
    checktab.fileInput.clear()
    checktab.searchInput.clear()
    checktab.fileInput.setText(metafile)
    checktab.searchInput.setText(tfile)
    checktab.checkButton.click()
    ptext = checktab.textEdit.toPlainText()
    assert ('100%' in ptext)
    rmpath(tfile, metafile)