Esempio n. 1
0
def test_main_verbose():
    main(['2d6', '--verbose'])
Esempio n. 2
0
def test_main_error2():
    "Test placing the error on the left"
    try:
        main(['000000000000000000000000000000000000000001d6, d0'])
    except SystemExit:
        pass
Esempio n. 3
0
def test_main(capsys):
    main(['2d6'])
Esempio n. 4
0
def test_main_max():
    main(['2d6', '--max'])
Esempio n. 5
0
def test_main_error():
    try:
        main(['d0'])
    except SystemExit:
        pass
Esempio n. 6
0
def test_main_error2():
    """Test placing the error on the left"""
    with raises(SystemExit):
        main(["000000000000000000000000000000000000000001d6, d0"])
Esempio n. 7
0
def test_main_min(capsys):
    main(['2d6', '--min'])
Esempio n. 8
0
def test_main_max_dice_err():
    with raises(SystemExit):
        main(["2d6", "--max-dice", "not_a_number"])
Esempio n. 9
0
def test_main_error():
    with raises(SystemExit):
        main(["d0"])
Esempio n. 10
0
def test_main_max():
    main(["2d6", "--max"])
Esempio n. 11
0
def test_main_max_dice():
    main(["2d6", "--max-dice", "2"])
Esempio n. 12
0
def test_main_min():
    main(["2d6", "--min"])
Esempio n. 13
0
def test_main_verbose():
    main(["2d6", "--verbose"])
Esempio n. 14
0
def test_main():
    main(["2d6"])
Esempio n. 15
0
def test_main_verbose():
    assert main(['1d6', '--verbose'])
Esempio n. 16
0
def test_main():
    assert isinstance(main(['2d6']), str)