sqlite with latin1 encoding test fails on windows
- Dominant language
- Python
- Stars
- 1k
- Forks
- 131
- PR merge metrics
- No merged PRs in 30d
Description
`odo/backends/tests/test_sqlite.py::test_different_encoding` test fails -- here, the test-case specifies NULL value to be empty string.
``` python
NULL = u''
```
However, on windows result should/is `NULL = None`
``` python
___________________________ test_different_encoding ___________________________
def test_different_encoding():
encoding = 'latin1'
with tmpfile('db') as db:
sql = odo(os.path.join(os.path.dirname(__file__), 'encoding.csv'),
'sqlite:///%s::t' % db, encoding=encoding)
result = odo(sql, list)
NULL = u''
expected = [(u'1958.001.500131-1A', 1, NULL, NULL, 899),
(u'1958.001.500156-6', 1, NULL, NULL, 899),
(u'1958.001.500162-1', 1, NULL, NULL, 899),
(u'1958.001.500204-2', 1, NULL, NULL, 899),
(u'1958.001.500204-2A', 1, NULL, NULL, 899),
(u'1958.001.500204-2B', 1, NULL, NULL, 899),
(u'1958.001.500223-6', 1, NULL, NULL, 9610),
(u'1958.001.500233-9', 1, NULL, NULL, 4703),
(u'1909.017.000018-3', 1, 30.0, u'sumaria', 899)]
> assert result == expected
E assert [('1958.001.5...ne, 899), ...] == [('1958.001.50...'', 899), ...]
E At index 0 diff: (u'1958.001.500131-1A', 1, None, None, 899) != (u'1958.001.500131-1A', 1, u'', u'', 899)
E Full diff:
E - [(u'1958.001.500131-1A', 1, None, None, 899),
E ? ^^^^ ^^^^
E + [(u'1958.001.500131-1A', 1, u'', u'', 899),
E ? ^^^ ^^^
E - (u'1958.001.500156-6', 1, None, None, 899),
E ? ^^^^ ^^^^
E + (u'1958.001.500156-6', 1, u'', u'', 899),
E Detailed information truncated (26 more lines), use "-vv" to show
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.