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