Exemple #1
0
def test_identifier_dollar():
    assert identifier("Table$") == "Table$"
Exemple #2
0
def test_identifier_quoted_space():
    assert identifier("A Table") == '"A Table"'
Exemple #3
0
def test_identifier_quoted_double_quote():
    assert identifier('A " Table') == '"A "" Table"'
Exemple #4
0
def test_identifier_quoted_first_char():
    assert identifier(" Table") == '" Table"'
Exemple #5
0
def test_identifier_quoted_null():
    with pytest.raises(
            InterfaceError,
            match="identifier cannot contain the code zero character"):
        identifier("tabl\u0000e")
Exemple #6
0
def test_identifier_empty():
    with pytest.raises(InterfaceError,
                       match="identifier must be > 0 characters in length"):
        identifier("")
Exemple #7
0
def test_identifier_int():
    with pytest.raises(InterfaceError, match="identifier must be a str"):
        identifier(9)
Exemple #8
0
def test_identifier():
    val = "top_secret"
    assert identifier(val) == val