blob: 25fb23d1d84606c010b556767477c72fbe1af3bb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
#!/usr/bin/env python
from six import StringIO
from cliff.formatters import value
def test_value_formatter():
sf = value.ValueFormatter()
c = ('a', 'b', 'c', 'd')
d = ('A', 'B', 'C', '"no escape me"')
expected = 'A\nB\nC\n"no escape me"\n'
output = StringIO()
sf.emit_one(c, d, output, None)
actual = output.getvalue()
assert expected == actual
|