Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Two test failures when ujson installed #262

Closed
@jayvdb

Description

@jayvdb

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

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp