- Notifications
You must be signed in to change notification settings - Fork590
Closed
Description
When ujson is installed, there are two errors in the test suite.
[ 51s] =================================== FAILURES ===================================[ 51s] _______________________________ test_json_kwargs _______________________________[ 51s] [ 51s] tmpdir = local('/tmp/pytest-of-abuild/pytest-0/test_json_kwargs0')[ 51s] [ 51s] def test_json_kwargs(tmpdir):[ 51s] db_file = tmpdir.join('test.db')[ 51s] > db = TinyDB(str(db_file), sort_keys=True, indent=4, separators=(',', ': '))[ 51s] [ 51s] tests/test_storages.py:35: [ 51s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ [ 51s] tinydb/database.py:165: in __init__[ 51s] self._table = self.table(default_table)[ 51s] tinydb/database.py:196: in table[ 51s] table = table_class(self._cls_storage_proxy(self._storage, name), name, **options)[ 51s] tinydb/database.py:302: in __init__[ 51s] data = self._read()[ 51s] tinydb/database.py:409: in _read[ 51s] return self._storage.read()[ 51s] tinydb/database.py:96: in read[ 51s] self._storage.write(raw_data)[ 51s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ [ 51s] [ 51s] self = <tinydb.storages.JSONStorage object at 0x7f661e42b910>[ 51s] data = {'_default': {}}[ 51s] [ 51s] def write(self, data):[ 51s] self._handle.seek(0)[ 51s] > serialized = json.dumps(data, **self.kwargs)[ 51s] E TypeError: 'separators' is an invalid keyword argument for this function[ 51s] [ 51s] tinydb/storages.py:112: TypeError[ 51s] ___________________________ test_insert_invalid_dict ___________________________[ 51s] [ 51s] tmpdir = local('/tmp/pytest-of-abuild/pytest-0/test_insert_invalid_dict0')[ 51s] [ 51s] def test_insert_invalid_dict(tmpdir):[ 51s] path = str(tmpdir.join('db.json'))[ 51s] [ 51s] with TinyDB(path) as _db:[ 51s] data = [{'int': 1}, {'int': 2}][ 51s] _db.insert_multiple(data)[ 51s] [ 51s] with pytest.raises(TypeError):[ 51s] > _db.insert({'int': {'bark'}}) # Fails[ 51s] E Failed: DID NOT RAISE <type 'exceptions.TypeError'>[ 51s]Builds athttps://build.opensuse.org/package/show/home:jayvdb:py-new/python-tinydb
Metadata
Metadata
Assignees
Labels
No labels