Source: todoman
Version: 3.4.1-1
Severity: serious
Tags: ftbfs

Some recent change in unstable makes todoman FTBFS:

https://tests.reproducible-builds.org/debian/history/todoman.html
https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/todoman.html

...
============================= test session starts ==============================
platform linux -- Python 3.7.1rc2, pytest-3.6.4, py-1.6.0, pluggy-0.6.0
hypothesis profile 'default' -> 
database=DirectoryBasedExampleDatabase('/build/1st/todoman-3.4.1/debian/hypothesis')
rootdir: /build/1st/todoman-3.4.1, inifile: setup.cfg
plugins: cov-2.5.1, hypothesis-3.71.11
collected 176 items

tests/test_backend.py .....F...                                          [  5%]
tests/test_cli.py .............x......................................s. [ 35%]
...........                                                              [ 42%]
tests/test_config.py .......xx......                                     [ 50%]
tests/test_filtering.py ..F......                                        [ 55%]
tests/test_formatter.py ...............                                  [ 64%]
tests/test_main.py .                                                     [ 64%]
tests/test_model.py ............ss..ss................                   [ 84%]
tests/test_porcelain.py ........                                         [ 88%]
tests/test_ui.py ...........                                             [ 94%]
tests/test_widgets.py .........                                          [100%]

=================================== FAILURES ===================================
___________________________ test_vtodo_serialization ___________________________

todo_factory = <function todo_factory.<locals>.inner at 0x7f416d253730>

    def test_vtodo_serialization(todo_factory):
        """Test VTODO serialization: one field of each type."""
        description = 'A tea would be nice, thanks.'
        todo = todo_factory(
            categories=['tea', 'drinking', 'hot'],
            description=description,
            due=datetime(3000, 3, 21),
            priority=7,
            status='IN-PROCESS',
            summary='Some tea',
>           rrule='FREQ=MONTHLY',
        )

tests/test_backend.py:61: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/conftest.py:92: in inner
    default_database.save(todo)
todoman/model.py:972: in save
    todo.id = self.cache.add_vtodo(vtodo, todo.path, todo.id)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <todoman.model.Cache object at 0x7f416d12cef0>
todo = VTODO({'SUMMARY': vText('b'Some tea''), 'PRIORITY': 7, 'SEQUENCE': 1, 
'UID': vText('b'9d51c32e08184bd2a617dbc2f51f87ad...c92d30>, 'LAST-MODIFIED': 
<icalendar.prop.vDDDTypes object at 0x7f416cc927f0>, 'RRULE': vRecur({'FREQ': 
['MONTHLY']})})
file_path = 
'/tmp/pytest-of-pbuilder1/pytest-0/test_vtodo_serialization0/default/9d51c32e08184bd2a617dbc2f51f8...@profitbricks-build11-amd64.ics'
id = None

    def add_vtodo(self, todo, file_path, id=None):
        """
            Adds a todo into the cache.
    
            :param icalendar.Todo todo: The icalendar component object on which
            """
    
        sql = '''
                INSERT INTO todos (
                    {}
                    file_path,
                    uid,
                    summary,
                    due,
                    start,
                    priority,
                    created_at,
                    completed_at,
                    percent_complete,
                    dtstamp,
                    status,
                    description,
                    location,
                    categories,
                    sequence,
                    last_modified,
                    rrule
                ) VALUES ({}?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
                '''
    
        due = self._serialize_datetime(todo, 'due')
        start = self._serialize_datetime(todo, 'dtstart')
    
        if start and due:
            start = None if start >= due else start
    
        params = (
            file_path,
            todo.get('uid'),
            todo.get('summary'),
            due,
            start,
            todo.get('priority', 0) or None,
            self._serialize_datetime(todo, 'created'),
            self._serialize_datetime(todo, 'completed'),
            todo.get('percent-complete', None),
            self._serialize_datetime(todo, 'dtstamp'),
            todo.get('status', 'NEEDS-ACTION'),
            todo.get('description', None),
            todo.get('location', None),
            todo.get('categories', None),
            todo.get('sequence', 1),
            self._serialize_datetime(todo, 'last-modified'),
            self._serialize_rrule(todo, 'rrule'),
        )
    
        if id:
            params = (id,) + params
            sql = sql.format('id,\n', '?, ')
        else:
            sql = sql.format('', '')
    
        cursor = self._conn.cursor()
        try:
>           cursor.execute(sql, params)
E           sqlite3.InterfaceError: Error binding parameter 13 - probably 
unsupported type.

todoman/model.py:604: InterfaceError
________________________________ test_category _________________________________

tmpdir = local('/tmp/pytest-of-pbuilder1/pytest-0/test_category0')
runner = <conftest.runner.<locals>.SleepyCliRunner object at 0x7f416c923f28>
create = <function create.<locals>.inner at 0x7f416c8edea0>

    def test_category(tmpdir, runner, create):
        result = runner.invoke(cli, ['list'], catch_exceptions=False)
        assert not result.exception
        assert not result.output.strip()
    
        create('one.ics', 'SUMMARY:haha\n' 'CATEGORIES:work,trip\n')
        create('two.ics', 'CATEGORIES:trip\n' 'SUMMARY:hoho\n')
        create('three.ics', 'SUMMARY:harhar\n')
        result = runner.invoke(cli, ['list', '--category', 'work'])
        assert not result.exception
>       assert 'haha' in result.output
E       AssertionError: assert 'haha' in 'Failed to read entry 
/tmp/pytest-of-pbuilder1/pytest-0/test_category0/default/two.ics.\nTraceback 
(most recent call l...\n    cursor.execute(sql, 
params)\nsqlite3.InterfaceError: Error binding parameter 13 - probably 
unsupported type.\n\n'
E        +  where 'Failed to read entry 
/tmp/pytest-of-pbuilder1/pytest-0/test_category0/default/two.ics.\nTraceback 
(most recent call l...\n    cursor.execute(sql, 
params)\nsqlite3.InterfaceError: Error binding parameter 13 - probably 
unsupported type.\n\n' = <Result okay>.output

tests/test_filtering.py:74: AssertionError
------------------------------ Captured log call -------------------------------
model.py                   926 ERROR    Failed to read entry 
/tmp/pytest-of-pbuilder1/pytest-0/test_category0/default/two.ics.
Traceback (most recent call last):
  File "/build/1st/todoman-3.4.1/.pybuild/cpython3_3.7/build/todoman/model.py", 
line 924, in update_cache
    self.cache.add_vtodo(component, entry_path)
  File "/build/1st/todoman-3.4.1/.pybuild/cpython3_3.7/build/todoman/model.py", 
line 604, in add_vtodo
    cursor.execute(sql, params)
sqlite3.InterfaceError: Error binding parameter 13 - probably unsupported type.
model.py                   926 ERROR    Failed to read entry 
/tmp/pytest-of-pbuilder1/pytest-0/test_category0/default/one.ics.
Traceback (most recent call last):
  File "/build/1st/todoman-3.4.1/.pybuild/cpython3_3.7/build/todoman/model.py", 
line 924, in update_cache
    self.cache.add_vtodo(component, entry_path)
  File "/build/1st/todoman-3.4.1/.pybuild/cpython3_3.7/build/todoman/model.py", 
line 604, in add_vtodo
    cursor.execute(sql, params)
sqlite3.InterfaceError: Error binding parameter 13 - probably unsupported type.

--------- coverage: platform linux, python 3.7.1-candidate-2 ---------
Name                       Stmts   Miss  Cover   Missing
--------------------------------------------------------
todoman/__init__.py            3      0   100%
todoman/__main__.py            3      0   100%
todoman/cli.py               284      0   100%
todoman/configuration.py      46      0   100%
todoman/exceptions.py         18      0   100%
todoman/formatters.py        157      0   100%
todoman/interactive.py        94      0   100%
todoman/model.py             458      0   100%
todoman/version.py             1      0   100%
todoman/widgets.py            94      0   100%
--------------------------------------------------------
TOTAL                       1158      0   100%

=============================== warnings summary ===============================
.pybuild/cpython3_3.7/build/tests/test_cli.py::test_sorting_fields
  /usr/lib/python3/dist-packages/hypothesis/database.py:82: 
HypothesisDeprecationWarning: The $HYPOTHESIS_DATABASE_FILE environment 
variable is deprecated, and will be ignored by a future version of Hypothesis.  
Configure your database location via a settings profile instead.
    return _db_for_path(*args, **kwargs)

.pybuild/cpython3_3.7/build/tests/test_cli.py::test_status_validation
  /usr/lib/python3/dist-packages/hypothesis/database.py:82: 
HypothesisDeprecationWarning: The $HYPOTHESIS_DATABASE_FILE environment 
variable is deprecated, and will be ignored by a future version of Hypothesis.  
Configure your database location via a settings profile instead.
    return _db_for_path(*args, **kwargs)

-- Docs: http://doc.pytest.org/en/latest/warnings.html
=== 2 failed, 166 passed, 5 skipped, 3 xfailed, 2 warnings in 11.72 seconds ====
E: pybuild pybuild:338: test: plugin distutils failed with: exit code=1: cd 
/build/1st/todoman-3.4.1/.pybuild/cpython3_3.7/build; python3.7 -m pytest tests
dh_auto_test: pybuild --test --test-pytest -i python{version} -p "3.7 3.6" 
returned exit code 13
make: *** [debian/rules:28: build] Error 25

Reply via email to