khal icon indicating copy to clipboard operation
khal copied to clipboard

0.10.0 TestCollection.test_multi_uid_vdir

Open dvzrv opened this issue 5 years ago • 6 comments

When building 0.10.0, the test for TestCollection.test_multi_uid_vdir fails:

============================= test session starts ==============================
platform linux -- Python 3.7.2, pytest-4.3.1, py-1.8.0, pluggy-0.9.0
rootdir: /build/khal/src/khal-0.10.0, inifile:                                  
collected 286 items                                                                                         
                                                                               
tests/backend_test.py ..........................                         [  9%]
tests/cal_display_test.py ......xxx                                      [ 12%]                                                                                                                   
tests/cli_test.py .............x.........................                [ 25%]
tests/configwizard_test.py .                                             [ 26%]                                                                                                                  
tests/controller_test.py ............                                    [ 30%]      
tests/event_test.py ............................................         [ 45%]             
tests/khalendar_test.py ....................F........                    [ 55%]     
tests/khalendar_utils_test.py .......................................    [ 69%]
tests/parse_datetime_test.py ........................................... [ 84%]
....                                                                     [ 86%]   
tests/settings_test.py ............                                      [ 90%]
tests/terminal_test.py ...                                               [ 91%]
tests/utils_test.py ...........                                          [ 95%]
tests/vdir_test.py x..                                                   [ 96%]
tests/vtimezone_test.py ...                                              [ 97%]
tests/ui/test_calendarwidget.py ...                                      [ 98%]
tests/ui/test_editor.py ....                                             [ 99%] 
tests/ui/test_widgets.py .                                               [100%]
                                                                                
=================================== FAILURES ===================================
______________________ TestCollection.test_multi_uid_vdir ______________________

self = <tests.khalendar_test.TestCollection object at 0x649e7654fcf8>
coll_vdirs = (<khal.khalendar.khalendar.CalendarCollection object at 0x649e7654f7b8>, {"Dad's calendar": <khal.khalendar.vdir.Vdir ...: <khal.khalendar.vdir.Vdir object at 0x649e7654fd30>, 'private': <khal.khalendar.vdir.Vdir object at 0x649e7654f1d0>})
caplog = <_pytest.logging.LogCaptureFixture object at 0x649e763e3cc0>
fix_caplog = None

    def test_multi_uid_vdir(self, coll_vdirs, caplog, fix_caplog):
        coll, vdirs = coll_vdirs
        caplog.set_level(logging.WARNING)
        vdirs[cal1].upload(DumbItem(_get_text('event_dt_multi_uid'), uid='12345'))
        coll.update_db()
        assert list(coll.search('')) == []
        messages = [rec.message for rec in caplog.records]
>       assert messages[0].startswith(
            "The .ics file at foobar/12345.ics contains multiple UIDs.\n"
        )
E       IndexError: list index out of range

tests/khalendar_test.py:348: IndexError
=============== 1 failed, 280 passed, 5 xfailed in 4.31 seconds ================

dvzrv avatar Mar 26 '19 19:03 dvzrv

Can you tell us a bit more about the environment? Which OS is this, which versions of the dependencies do you use?

geier avatar Mar 28 '19 17:03 geier

@geier, Arch Linux: https://www.archlinux.org/packages/community/any/khal/

python-atomicwrites 1.3.0-1 python-click 7.0-1 python-click-log 0.3.2-2 python-configobj 5.0.6-4 python-dateutil 2.8.0-1 python-icalendar 4.0.3-1 python-pytz 2018.9-1 python-setuptools 1:40.8.0-1 python-tzlocal 1.5.1-4 python-urwid 2.0.1-2 python-xdg 0.26-2

polyzen avatar Mar 28 '19 20:03 polyzen

@geier yes, what @polyzen wrote. Sorry for the relatively unspecific report. I'm travelling right now

dvzrv avatar Mar 29 '19 06:03 dvzrv

We encountered similar issues migrating to GitHub Actions (#1075) which were caused by low clock/mtime resolution. master now has some delays, so it may be worth revisiting this in case that solves it for you too.

d7415 avatar Jul 26 '21 11:07 d7415

@polyzen could you rerun the tests now with the delays introduced by @d7415 and @WhyNotHugo ?

geier avatar Jun 26 '22 12:06 geier

Getting no test failures with 0.10.5. 👍

polyzen avatar Jun 26 '22 18:06 polyzen