Esempio n. 1
0
def test_str2iso_reference_random_strings():
    for x in range(1000):
        teststr = ''
        for y in range(5, 14):
            teststr += random.choice(ISO_REFERENCE_VALID)
        reference = str2iso_reference(teststr)
        assert iso_reference_isvalid(reference)
Esempio n. 2
0
def test_str2iso_reference_random_strings():
    for x in range(1000):
        teststr = ''
        for y in range(5, 14):
            teststr += random.choice(ISO_REFERENCE_VALID)
        reference = str2iso_reference(teststr)
        assert iso_reference_isvalid(reference)
Esempio n. 3
0
def test_str2iso_reference_random_integers():
    for x in range(1000):
        testint = random.randint(1, 2**24)
        reference = str2iso_reference(str(testint))
        assert iso_reference_isvalid(reference)
Esempio n. 4
0
def test_iso_reference_isvalid_invalid_results():
    assert not iso_reference_isvalid('RF40C2H5OH')
Esempio n. 5
0
def test_iso_reference_isvalid_valid_results():
    assert iso_reference_isvalid('RF97C2H5OH')
Esempio n. 6
0
def test_str2iso_reference_random_integers():
    for x in range(1000):
        testint = random.randint(1, 2**24)
        reference = str2iso_reference(str(testint))
        assert iso_reference_isvalid(reference)
Esempio n. 7
0
def test_iso_reference_isvalid_invalid_results():
    assert not iso_reference_isvalid('RF40C2H5OH')
Esempio n. 8
0
def test_iso_reference_isvalid_valid_results():
    assert iso_reference_isvalid('RF97C2H5OH')