Recent master fails test #95

Closed
opened 2018-09-24 14:00:26 +00:00 by floli · 3 comments
Collaborator

This is from 5d8ac158ce, Arch Linux, Python 3.7.0

py3 develop-inst-nodeps: /home/florian/software/borgmatic
WARNING: Discarding $PYTHONPATH from environment, to override specify PYTHONPATH in 'passenv' in your configuration.
py3 installed: atomicwrites==1.2.1,attrs==18.2.0,-e git+ssh://git@projects.torsion.org:3022/floli/borgmatic.git@5d8ac158ce90025fc9f19c6c2e19937dff1a2be8#egg=borgmatic,coverage==4.5.1,docopt==0.6.2,flexmock==0.10.2,more-itertools==4.3.0,pluggy==0.7.1,py==1.6.0,pykwalify==1.6.1,pytest==3.7.4,pytest-cov==2.5.1,python-dateutil==2.7.3,PyYAML==3.13,ruamel.yaml==0.15.70,six==1.11.0
py3 run-test-pre: PYTHONHASHSEED='108996576'
py3 runtests: commands[0] | py.test --cov-report term-missing:skip-covered --cov=borgmatic borgmatic
=========================================================================================================== test session starts ============================================================================================================
platform linux -- Python 3.7.0, pytest-3.7.4, py-1.6.0, pluggy-0.7.1
rootdir: /home/florian/software/borgmatic, inifile:
plugins: cov-2.5.1
collected 182 items                                                                                                                                                                                                                        

borgmatic/tests/integration/test_version.py .                                                                                                                                                                                        [  0%]
borgmatic/tests/integration/commands/test_borgmatic.py ............                                                                                                                                                                  [  7%]
borgmatic/tests/integration/commands/test_convert_config.py ....                                                                                                                                                                     [  9%]
borgmatic/tests/integration/commands/test_generate_config.py ..                                                                                                                                                                      [ 10%]
borgmatic/tests/integration/config/test_generate.py F...F.                                                                                                                                                                           [ 13%]
borgmatic/tests/integration/config/test_legacy.py .                                                                                                                                                                                  [ 14%]
borgmatic/tests/integration/config/test_validate.py ........                                                                                                                                                                         [ 18%]
borgmatic/tests/unit/test_verbosity.py ..                                                                                                                                                                                            [ 19%]
borgmatic/tests/unit/borg/test_check.py ..........................                                                                                                                                                                   [ 34%]
borgmatic/tests/unit/borg/test_create.py ...............................................                                                                                                                                             [ 59%]
borgmatic/tests/unit/borg/test_extract.py .......                                                                                                                                                                                    [ 63%]
borgmatic/tests/unit/borg/test_hook.py ...                                                                                                                                                                                           [ 65%]
borgmatic/tests/unit/borg/test_info.py .......                                                                                                                                                                                       [ 69%]
borgmatic/tests/unit/borg/test_list.py .......                                                                                                                                                                                       [ 73%]
borgmatic/tests/unit/borg/test_prune.py ..........                                                                                                                                                                                   [ 78%]
borgmatic/tests/unit/commands/test_borgmatic.py .                                                                                                                                                                                    [ 79%]
borgmatic/tests/unit/config/test_collect.py .........                                                                                                                                                                                [ 84%]
borgmatic/tests/unit/config/test_convert.py .........                                                                                                                                                                                [ 89%]
borgmatic/tests/unit/config/test_generate.py .                                                                                                                                                                                       [ 89%]
borgmatic/tests/unit/config/test_legacy.py .............                                                                                                                                                                             [ 96%]
borgmatic/tests/unit/config/test_validate.py ......                                                                                                                                                                                  [100%]

================================================================================================================= FAILURES =================================================================================================================
____________________________________________________________________________________________ test_insert_newline_before_comment_does_not_raise _____________________________________________________________________________________________

    def test_insert_newline_before_comment_does_not_raise():
        field_name = 'foo'
>       config = module.yaml.comments.CommentedMap([(field_name, 33)])

borgmatic/tests/integration/config/test_generate.py:13: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/py3/lib/python3.7/site-packages/ruamel/yaml/comments.py:647: in __init__
    ordereddict.__init__(self, *args, **kw)  # type: ignore
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = ordereddict([('foo', 33)]), key = 'foo', value = 33

    def __setitem__(self, key, value):
        # type: (Any, Any) -> None
        # try to preserve the scalarstring type if setting an existing key to a new value
        if key in self:
            if (
                isinstance(value, string_types)
                and not isinstance(value, ScalarString)
                and isinstance(self[key], ScalarString)
            ):
                value = type(self[key])(value)
        ordereddict.__setitem__(self, key, value)
>       self._ok.add(key)
E       AttributeError: _ok

.tox/py3/lib/python3.7/site-packages/ruamel/yaml/comments.py:775: AttributeError
____________________________________________________________________________________________ test_add_comments_to_configuration_does_not_raise _____________________________________________________________________________________________

    def test_add_comments_to_configuration_does_not_raise():
        # Ensure that it can deal with fields both in the schema and missing from the schema.
>       config = module.yaml.comments.CommentedMap([('foo', 33), ('bar', 44), ('baz', 55)])

borgmatic/tests/integration/config/test_generate.py:48: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/py3/lib/python3.7/site-packages/ruamel/yaml/comments.py:647: in __init__
    ordereddict.__init__(self, *args, **kw)  # type: ignore
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = ordereddict([('foo', 33)]), key = 'foo', value = 33

    def __setitem__(self, key, value):
        # type: (Any, Any) -> None
        # try to preserve the scalarstring type if setting an existing key to a new value
        if key in self:
            if (
                isinstance(value, string_types)
                and not isinstance(value, ScalarString)
                and isinstance(self[key], ScalarString)
            ):
                value = type(self[key])(value)
        ordereddict.__setitem__(self, key, value)
>       self._ok.add(key)
E       AttributeError: _ok

.tox/py3/lib/python3.7/site-packages/ruamel/yaml/comments.py:775: AttributeError

----------- coverage: platform linux, python 3.7.0-final-0 -----------
Name                                                  Stmts   Miss  Cover   Missing
-----------------------------------------------------------------------------------
borgmatic/config/generate.py                             36      4    89%   15, 76-82
borgmatic/tests/integration/config/test_generate.py      39      4    90%   14-16, 49-56
-----------------------------------------------------------------------------------
TOTAL                                                  1497      8    99%

48 files skipped due to complete coverage.

=================================================================================================== 2 failed, 180 passed in 1.31 seconds ===================================================================================================
ERROR: InvocationError for command '/home/florian/software/borgmatic/.tox/py3/bin/py.test --cov-report term-missing:skip-covered --cov=borgmatic borgmatic' (exited with code 1)
_________________________________________________________________________________________________________________ summary __________________________________________________________________________________________________________________
ERROR:   py3: commands failed
This is from 5d8ac158ce90025fc9f19c6c2e19937dff1a2be8, Arch Linux, Python 3.7.0 ``` py3 develop-inst-nodeps: /home/florian/software/borgmatic WARNING: Discarding $PYTHONPATH from environment, to override specify PYTHONPATH in 'passenv' in your configuration. py3 installed: atomicwrites==1.2.1,attrs==18.2.0,-e git+ssh://git@projects.torsion.org:3022/floli/borgmatic.git@5d8ac158ce90025fc9f19c6c2e19937dff1a2be8#egg=borgmatic,coverage==4.5.1,docopt==0.6.2,flexmock==0.10.2,more-itertools==4.3.0,pluggy==0.7.1,py==1.6.0,pykwalify==1.6.1,pytest==3.7.4,pytest-cov==2.5.1,python-dateutil==2.7.3,PyYAML==3.13,ruamel.yaml==0.15.70,six==1.11.0 py3 run-test-pre: PYTHONHASHSEED='108996576' py3 runtests: commands[0] | py.test --cov-report term-missing:skip-covered --cov=borgmatic borgmatic =========================================================================================================== test session starts ============================================================================================================ platform linux -- Python 3.7.0, pytest-3.7.4, py-1.6.0, pluggy-0.7.1 rootdir: /home/florian/software/borgmatic, inifile: plugins: cov-2.5.1 collected 182 items borgmatic/tests/integration/test_version.py . [ 0%] borgmatic/tests/integration/commands/test_borgmatic.py ............ [ 7%] borgmatic/tests/integration/commands/test_convert_config.py .... [ 9%] borgmatic/tests/integration/commands/test_generate_config.py .. [ 10%] borgmatic/tests/integration/config/test_generate.py F...F. [ 13%] borgmatic/tests/integration/config/test_legacy.py . [ 14%] borgmatic/tests/integration/config/test_validate.py ........ [ 18%] borgmatic/tests/unit/test_verbosity.py .. [ 19%] borgmatic/tests/unit/borg/test_check.py .......................... [ 34%] borgmatic/tests/unit/borg/test_create.py ............................................... [ 59%] borgmatic/tests/unit/borg/test_extract.py ....... [ 63%] borgmatic/tests/unit/borg/test_hook.py ... [ 65%] borgmatic/tests/unit/borg/test_info.py ....... [ 69%] borgmatic/tests/unit/borg/test_list.py ....... [ 73%] borgmatic/tests/unit/borg/test_prune.py .......... [ 78%] borgmatic/tests/unit/commands/test_borgmatic.py . [ 79%] borgmatic/tests/unit/config/test_collect.py ......... [ 84%] borgmatic/tests/unit/config/test_convert.py ......... [ 89%] borgmatic/tests/unit/config/test_generate.py . [ 89%] borgmatic/tests/unit/config/test_legacy.py ............. [ 96%] borgmatic/tests/unit/config/test_validate.py ...... [100%] ================================================================================================================= FAILURES ================================================================================================================= ____________________________________________________________________________________________ test_insert_newline_before_comment_does_not_raise _____________________________________________________________________________________________ def test_insert_newline_before_comment_does_not_raise(): field_name = 'foo' > config = module.yaml.comments.CommentedMap([(field_name, 33)]) borgmatic/tests/integration/config/test_generate.py:13: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .tox/py3/lib/python3.7/site-packages/ruamel/yaml/comments.py:647: in __init__ ordereddict.__init__(self, *args, **kw) # type: ignore _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = ordereddict([('foo', 33)]), key = 'foo', value = 33 def __setitem__(self, key, value): # type: (Any, Any) -> None # try to preserve the scalarstring type if setting an existing key to a new value if key in self: if ( isinstance(value, string_types) and not isinstance(value, ScalarString) and isinstance(self[key], ScalarString) ): value = type(self[key])(value) ordereddict.__setitem__(self, key, value) > self._ok.add(key) E AttributeError: _ok .tox/py3/lib/python3.7/site-packages/ruamel/yaml/comments.py:775: AttributeError ____________________________________________________________________________________________ test_add_comments_to_configuration_does_not_raise _____________________________________________________________________________________________ def test_add_comments_to_configuration_does_not_raise(): # Ensure that it can deal with fields both in the schema and missing from the schema. > config = module.yaml.comments.CommentedMap([('foo', 33), ('bar', 44), ('baz', 55)]) borgmatic/tests/integration/config/test_generate.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .tox/py3/lib/python3.7/site-packages/ruamel/yaml/comments.py:647: in __init__ ordereddict.__init__(self, *args, **kw) # type: ignore _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = ordereddict([('foo', 33)]), key = 'foo', value = 33 def __setitem__(self, key, value): # type: (Any, Any) -> None # try to preserve the scalarstring type if setting an existing key to a new value if key in self: if ( isinstance(value, string_types) and not isinstance(value, ScalarString) and isinstance(self[key], ScalarString) ): value = type(self[key])(value) ordereddict.__setitem__(self, key, value) > self._ok.add(key) E AttributeError: _ok .tox/py3/lib/python3.7/site-packages/ruamel/yaml/comments.py:775: AttributeError ----------- coverage: platform linux, python 3.7.0-final-0 ----------- Name Stmts Miss Cover Missing ----------------------------------------------------------------------------------- borgmatic/config/generate.py 36 4 89% 15, 76-82 borgmatic/tests/integration/config/test_generate.py 39 4 90% 14-16, 49-56 ----------------------------------------------------------------------------------- TOTAL 1497 8 99% 48 files skipped due to complete coverage. =================================================================================================== 2 failed, 180 passed in 1.31 seconds =================================================================================================== ERROR: InvocationError for command '/home/florian/software/borgmatic/.tox/py3/bin/py.test --cov-report term-missing:skip-covered --cov=borgmatic borgmatic' (exited with code 1) _________________________________________________________________________________________________________________ summary __________________________________________________________________________________________________________________ ERROR: py3: commands failed ```
Owner

Thanks for reporting. My guess is that this is a newly introduced breakage/incompatibility with ruamel.yaml 0.15.70, just released.

Thanks for reporting. My guess is that this is a newly introduced breakage/incompatibility with [ruamel.yaml 0.15.70](https://pypi.org/project/ruamel.yaml/#changelog), just released.
witten added the
bug
label 2018-09-24 15:11:18 +00:00
Owner

I haven't come up with a fix, but I did file this ruamel.yaml ticket, so we'll see what happens with that: https://bitbucket.org/ruamel/yaml/issues/242/01570-breaks-commentedmap-constructor

The apparent regression appears to have been introduced by https://bitbucket.org/ruamel/yaml/issues/233/api-discussion-base-classes-of which was released as part of ruamel.yaml 0.15.70.

I haven't come up with a fix, but I did file this ruamel.yaml ticket, so we'll see what happens with that: https://bitbucket.org/ruamel/yaml/issues/242/01570-breaks-commentedmap-constructor The apparent regression appears to have been introduced by https://bitbucket.org/ruamel/yaml/issues/233/api-discussion-base-classes-of which was released as part of ruamel.yaml 0.15.70.
Owner

ruamel.yaml 0.15.71 fixes the issue. I recommend you upgrade ruamel.yaml!

See https://bitbucket.org/ruamel/yaml/issues/242/01570-breaks-commentedmap-constructor for more info.

ruamel.yaml 0.15.71 fixes the issue. I recommend you upgrade ruamel.yaml! See https://bitbucket.org/ruamel/yaml/issues/242/01570-breaks-commentedmap-constructor for more info.
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: borgmatic-collective/borgmatic#95
No description provided.