[issue13330] Attempt full test coverage of LocaleTextCalendar.formatweekday

2022-03-22 Thread Irit Katriel


Irit Katriel  added the comment:

See also issue25528.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13330] Attempt full test coverage of LocaleTextCalendar.formatweekday

2022-03-22 Thread Irit Katriel


Irit Katriel  added the comment:

The patch needs to be reviewed. If the tests are still relevant and increase 
coverage, it needs to be converted to a GitHub PR. Otherwise this issue can be 
closed.

--
keywords: +easy -needs review, patch
nosy: +iritkatriel
versions: +Python 3.11 -Python 3.4, Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13330] Attempt full test coverage of LocaleTextCalendar.formatweekday

2015-11-26 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The test depends on the en_US locale. Only existing of POSIX locale is 
guarantied. The test should be skipped instead of failed if the en_US locale is 
not available. It would be nice to test also with other locales. For example 
with de_DE, fr_FR, tr_TR, ps_AF - these locales are used also in other tests.

--
nosy: +serhiy.storchaka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13330] Attempt full test coverage of LocaleTextCalendar.formatweekday

2015-11-26 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

And it looks that only empty locale works on Windows (issue21731).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13330] Attempt full test coverage of LocaleTextCalendar.formatweekday

2015-01-28 Thread Berker Peksag

Changes by Berker Peksag berker.pek...@gmail.com:


--
nosy: +berker.peksag
versions: +Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13330
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13330] Attempt full test coverage of LocaleTextCalendar.formatweekday

2014-04-27 Thread Jessica McKellar

Jessica McKellar added the comment:

Thanks for working to increase our test coverage, Sean.Fleming!

Looking at the current coverage, the there is one line in 
LocaleTextCalendar.formatweekday without coverage: 
http://hg.python.org/cpython/file/e159cb0d955b/Lib/calendar.py#l519.

You add some additional tests, but they are mostly testing some very literal 
aspects of the implementation rather than the purpose of the function. For 
example:

+self.assertRaises(IndexError, 
calendar.LocaleTextCalendar(locale='').formatweekday, 7, 1 )

It's true that this will raise an IndexError, but formatweekday isn't supposed 
to be called with these values.

I've added some tests that add coverage for the line that didn't have coverage, 
while focusing on the purpose of the function, namely to provide an appropriate 
day name when constrained to various widths.

* The patch passes the full test suite
* The patch passes `make patchcheck`
* The patch results in full coverage for LocaleTextCalendar.formatweekday

Coverage results, before and after:

$ ./python.exe ../coveragepy/ run --pylib --source=calendar 
Lib/test/regrtest.py test_calendar
[1/1] test_calendar
1 test OK.
nitefly:cpython jesstess$ ./python.exe ../coveragepy/ report --show-missing
Name   Stmts   Miss  Cover   Missing

Lib/calendar 375 5486%   511, 519, 541, 608-699, 703
$ patch -p1  issue13330.patch 
patching file Lib/test/test_calendar.py
patching file Misc/ACKS
$ ./python.exe ../coveragepy/ run --pylib --source=calendar 
Lib/test/regrtest.py test_calendar
[1/1] test_calendar
1 test OK.
nitefly:cpython jesstess$ ./python.exe ../coveragepy/ report --show-missing
Name   Stmts   Miss  Cover   Missing

Lib/calendar 375 5386%   511, 541, 608-699, 703

(519 was the one line without coverage inside LocaleTextCalendar.formatweekday)

--
nosy: +jesstess
versions: +Python 3.5 -Python 3.3
Added file: http://bugs.python.org/file35060/issue13330.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13330
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13330] Attempt full test coverage of LocaleTextCalendar.formatweekday

2011-11-04 Thread Terry J. Reedy

Changes by Terry J. Reedy tjre...@udel.edu:


--
nosy: +rhettinger, terry.reedy

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13330
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13330] Attempt full test coverage of LocaleTextCalendar.formatweekday

2011-11-03 Thread Sean Fleming

New submission from Sean Fleming seanmtflem...@gmail.com:

Patch includes new statements in test_localecalendars of CalendarTestCase such 
that coverage of LocaleTextCalendar.formatweekday should improve significantly. 

Feedback is appreciated.

--
components: Tests
files: test_calendar.patch
keywords: patch
messages: 146895
nosy: Sean.Fleming
priority: normal
severity: normal
status: open
title: Attempt full test coverage of LocaleTextCalendar.formatweekday
versions: Python 3.4
Added file: http://bugs.python.org/file23603/test_calendar.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13330
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13330] Attempt full test coverage of LocaleTextCalendar.formatweekday

2011-11-03 Thread Petri Lehtinen

Changes by Petri Lehtinen pe...@digip.org:


--
components: +Library (Lib)
keywords: +needs review
stage:  - patch review
type:  - feature request
versions: +Python 3.3 -Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13330
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com