self = <swh.storage.tests.test_storage.TestStorage object at 0x7f7a5fa96940>
swh_storage = <swh.storage.validate.ValidatingProxyStorage object at 0x7f7a640f9470>
def test_person_fullname_unicity(self, swh_storage):
# given (person injection through revisions for example)
revision = data.revision
# create a revision with same committer fullname but wo name and email
revision2 = copy.deepcopy(data.revision2)
revision2["committer"] = dict(revision["committer"])
revision2["committer"]["email"] = None
revision2["committer"]["name"] = None
> swh_storage.revision_add([revision])
.tox/py3/lib/python3.7/site-packages/swh/storage/tests/test_storage.py:2388:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/py3/lib/python3.7/site-packages/swh/storage/validate.py:104: in revision_add
[dict_converter(Revision, r) for r in revisions]
.tox/py3/lib/python3.7/site-packages/swh/storage/metrics.py:24: in d
return f(*a, **kw)
.tox/py3/lib/python3.7/site-packages/swh/storage/metrics.py:77: in d
r = f(*a, **kw)
.tox/py3/lib/python3.7/site-packages/swh/core/db/common.py:62: in _meth
return meth(self, *args, db=db, cur=cur, **kwargs)
.tox/py3/lib/python3.7/site-packages/swh/storage/storage.py:579: in revision_add
lambda rev: parents_filtered.extend(rev["parents"]),
.tox/py3/lib/python3.7/site-packages/swh/core/db/__init__.py:213: in copy_to
raise exc_info[1].with_traceback(exc_info[2])
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
def writer():
nonlocal exc_info
cursor = self.cursor(cur)
with open(read_file, "r") as f:
try:
cursor.copy_expert(
> "COPY %s (%s) FROM STDIN CSV" % (tblname, ", ".join(columns)), f
)
E psycopg2.errors.BadCopyFileFormat: unterminated CSV quoted field
E CONTEXT: COPY tmp_revision, line 1: "\x066b1b62dbfa033362092af468bf6cfabec230e7,"2009-02-13T23:31:30+00:00",120,False,"2005-08-07T23:19:4..."
.tox/py3/lib/python3.7/site-packages/swh/core/db/__init__.py:175: BadCopyFileFormat
TEST RESULT
TEST RESULT
- Run At
- Jul 6 2020, 2:26 PM