[issue14281] Add unit test for cgi.escape method

2012-03-12 Thread Brian Landers

New submission from Brian Landers :

The cgi.escape method is deprecated, but it should still have test coverage.  
This patch adds a test for it.

--
components: Tests
files: cgi_test_escape.patch
keywords: patch
messages: 155563
nosy: packetslave
priority: normal
severity: normal
status: open
title: Add unit test for cgi.escape method
type: enhancement
versions: Python 3.3
Added file: http://bugs.python.org/file24811/cgi_test_escape.patch

___
Python tracker 
<http://bugs.python.org/issue14281>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14322] More test coverage for hmac.py

2012-03-15 Thread Brian Landers

New submission from Brian Landers :

Adding some tests to non-default code paths in hmac.py to get to 100% coverage.

--
components: Tests
files: test_hmac.patch
keywords: patch
messages: 155913
nosy: packetslave
priority: normal
severity: normal
status: open
title: More test coverage for hmac.py
type: enhancement
versions: Python 2.7, Python 3.2, Python 3.3
Added file: http://bugs.python.org/file24865/test_hmac.patch

___
Python tracker 
<http://bugs.python.org/issue14322>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14323] Normalize math precision in RGB/YIQ conversion

2012-03-15 Thread Brian Landers

New submission from Brian Landers :

There doesn't seem to be a standard definition for the constants to use when 
doing the matrix calculations to convert RGB to YIQ or vise versa.  

Also, the current colorsys library uses two digits of precision for RGB-YIQ but 
six digits for YIQ-RGB.

The attached patch standardizes both functions to use the same constants as 
Matlab, using the same 3 digits of precision.  This makes a roundtrip of 
RGB->YIQ->RGB return the original values (for 3 digits of precision).

Also added tests, which brings colorsys.py to 100% coverage.

--
components: Library (Lib)
files: colorlib.patch
keywords: patch
messages: 155915
nosy: packetslave
priority: normal
severity: normal
status: open
title: Normalize math precision in RGB/YIQ conversion
type: enhancement
versions: Python 2.7, Python 3.2, Python 3.3
Added file: http://bugs.python.org/file24866/colorlib.patch

___
Python tracker 
<http://bugs.python.org/issue14323>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14323] Normalize math precision in RGB/YIQ conversion

2012-03-15 Thread Brian Landers

Changes by Brian Landers :


Added file: http://bugs.python.org/file24867/acks.patch

___
Python tracker 
<http://bugs.python.org/issue14323>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14323] Normalize math precision in RGB/YIQ conversion

2012-03-16 Thread Brian Landers

Brian Landers  added the comment:

Matlab docs are here:
- http://www.mathworks.com/help/toolbox/images/ref/rgb2ntsc.html
- http://www.mathworks.com/help/toolbox/images/ref/ntsc2rgb.html

Should these be referenced in the source itself?

re new versions: sure, I'll create a separate patch for adding the tests to the 
maintenance releases so there's coverage there, too.  Should that have a new 
bug as well?

--

___
Python tracker 
<http://bugs.python.org/issue14323>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14323] Normalize math precision in RGB/YIQ conversion

2012-03-16 Thread Brian Landers

Brian Landers  added the comment:

Updated to add Matlab refs, also added a roundtrip RGB-YIQ-RGB test to match 
the other conversions.

--
Added file: http://bugs.python.org/file24895/colorlib.patch

___
Python tracker 
<http://bugs.python.org/issue14323>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14322] More test coverage for hmac

2012-03-16 Thread Brian Landers

Brian Landers  added the comment:

Updated to use the correct assert* methods.

--
Added file: http://bugs.python.org/file24896/test_hmac.patch

___
Python tracker 
<http://bugs.python.org/issue14322>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com