def test_randprime():
    import random
    random.seed(1234)
    assert randprime(2, 3) == 2
    assert randprime(1, 3) == 2
    assert randprime(3, 5) == 3
    raises(ValueError, lambda: randprime(20, 22))
    for a in [100, 300, 500, 250000]:
        for b in [100, 300, 500, 250000]:
            p = randprime(a, a + b)
            assert a <= (a + b) < p and isprime(p)
dataset/ETHPy150Open sympy/sympy/sympy/ntheory/tests/test_generate.py/test_randprime/swapped operands of `<`