コード例 #1
0
def test_main_verbose():
    main(['2d6', '--verbose'])
コード例 #2
0
def test_main_error2():
    "Test placing the error on the left"
    try:
        main(['000000000000000000000000000000000000000001d6, d0'])
    except SystemExit:
        pass
コード例 #3
0
def test_main(capsys):
    main(['2d6'])
コード例 #4
0
def test_main_max():
    main(['2d6', '--max'])
コード例 #5
0
def test_main_error():
    try:
        main(['d0'])
    except SystemExit:
        pass
コード例 #6
0
ファイル: test_command.py プロジェクト: camillescott/zardoz
def test_main_error2():
    """Test placing the error on the left"""
    with raises(SystemExit):
        main(["000000000000000000000000000000000000000001d6, d0"])
コード例 #7
0
def test_main_min(capsys):
    main(['2d6', '--min'])
コード例 #8
0
ファイル: test_command.py プロジェクト: camillescott/zardoz
def test_main_max_dice_err():
    with raises(SystemExit):
        main(["2d6", "--max-dice", "not_a_number"])
コード例 #9
0
ファイル: test_command.py プロジェクト: camillescott/zardoz
def test_main_error():
    with raises(SystemExit):
        main(["d0"])
コード例 #10
0
ファイル: test_command.py プロジェクト: camillescott/zardoz
def test_main_max():
    main(["2d6", "--max"])
コード例 #11
0
ファイル: test_command.py プロジェクト: camillescott/zardoz
def test_main_max_dice():
    main(["2d6", "--max-dice", "2"])
コード例 #12
0
ファイル: test_command.py プロジェクト: camillescott/zardoz
def test_main_min():
    main(["2d6", "--min"])
コード例 #13
0
ファイル: test_command.py プロジェクト: camillescott/zardoz
def test_main_verbose():
    main(["2d6", "--verbose"])
コード例 #14
0
ファイル: test_command.py プロジェクト: camillescott/zardoz
def test_main():
    main(["2d6"])
コード例 #15
0
ファイル: test_command.py プロジェクト: roaet/python-dice
def test_main_verbose():
    assert main(['1d6', '--verbose'])
コード例 #16
0
ファイル: test_command.py プロジェクト: roaet/python-dice
def test_main():
    assert isinstance(main(['2d6']), str)