> Hello Kunal,
> I merged your branch into mine. It works if I run this test on a Sunday (for
> instance Sun 5th April), but fails if I run it on the 31st of March for
> instance, I get this  errror:
> 
> Traceback (most recent call last):
>   File "/home/letozaf/autopilot-tests/dayview-test-default-
> view/tests/autopilot/calendar_app/tests/test_dayview.py", line 77, in
> test_default_view
>     self.day_view.get_weeknumer(today).text, 'W' + now.strftime("%U"))
>   File "/usr/lib/python3/dist-packages/testtools/testcase.py", line 338, in
> assertEqual
>     self.assertThat(observed, matcher, message)
>   File "/usr/lib/python3/dist-packages/testtools/testcase.py", line 423, in
> assertThat
>     raise mismatch_error
> testtools.matchers._impl.MismatchError: 'W14' != 'W13'

Hello Carla, 

I read python strftime doc. As per it, week start from 00 and end at 53. As per 
our implementation it start from 1 and end at 54.

Also we need to check what is locale set as per that we should use %U or %W. 
I referred this link https://docs.python.org/2/library/time.html

-- 
https://code.launchpad.net/~carla-sella/ubuntu-calendar-app/dayview-test-default-view/+merge/253760
Your team Ubuntu Calendar Developers is subscribed to branch 
lp:ubuntu-calendar-app.

-- 
Mailing list: https://launchpad.net/~ubuntu-touch-coreapps-reviewers
Post to     : ubuntu-touch-coreapps-reviewers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~ubuntu-touch-coreapps-reviewers
More help   : https://help.launchpad.net/ListHelp

Reply via email to