示例#1
0
def test_show_install(capsys):
    show_install()
    captured = capsys.readouterr()
    #print(captured.out)
    match = re.findall(rf'fastai\s+: {fastai.__version__}', captured.out)
    assert match
    match = re.findall(rf'torch\s+: {torch.__version__}', captured.out)
    assert match
示例#2
0
def test_show_install(capsys):
    this_tests(show_install)
    show_install()
    captured = capsys.readouterr()
    #print(captured.out)
    match = re.findall(rf'fastai\s+: {fastai.__version__}', captured.out)
    assert match
    match = re.findall(rf'torch\s+: {re.escape(torch.__version__)}', captured.out)
    assert match
示例#3
0
def test_show_install(capsys):
    this_tests(show_install)
    show_install()
    captured = capsys.readouterr()
    # print(captured.out)
    match = re.findall(rf"fastai\s+: {fastai.__version__}", captured.out)
    assert match
    match = re.findall(rf"torch\s+: {re.escape(torch.__version__)}",
                       captured.out)
    assert match