示例#1
0
def test_kv_field_with_backtick():
    expected = ':Ref: :ref:`my_reference`'
    result = kv_field('Ref', ':ref:`my_reference`')
    assert result == expected
示例#2
0
def test_kv_field_with_none():
    expected = ':None: ``None``'
    result = kv_field(None, None)
    assert result == expected
示例#3
0
def test_kv_field_with_bool():
    expected = ':True: ``False``'
    result = kv_field(True, False)
    assert result == expected
示例#4
0
def test_kv_field_with_integers():
    expected = ':1: ``2``'
    result = kv_field(1, 2)
    assert result == expected
示例#5
0
def test_kv_field():
    expected = ':foo: ``bar``'
    result = kv_field('foo', 'bar')
    assert result == expected