[Python-Dev] Introducing test coverage stats

2008-03-18 Thread Jerry Seutter
I have added a bugtracker issue that adds unit test coverage statistics.
Issue 2403:

http://bugs.python.org/issue2403

Directions are on the issue page.

Titus: Brent suggested I bug you to review this.

Test, complain, flame.  Feedback welcome.

Jerry Seutter
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Introducing test coverage stats

2008-03-18 Thread Jerry Seutter
s/Brent/Brett (sorry Brett.  We still love you.)

On Tue, Mar 18, 2008 at 3:00 PM, Jerry Seutter [EMAIL PROTECTED] wrote:

 I have added a bugtracker issue that adds unit test coverage statistics.
 Issue 2403:

 http://bugs.python.org/issue2403

 Directions are on the issue page.

 Titus: Brent suggested I bug you to review this.

 Test, complain, flame.  Feedback welcome.

 Jerry Seutter

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] test_pty fails on Sparc Solaris 10 for trunk

2007-04-29 Thread Jerry Seutter

I was mucking about in test_pty.py not too long ago.  I'll take a look.

Jerry

On 4/24/07, Grig Gheorghiu [EMAIL PROTECTED] wrote:


This is happening both in the Python buildbot farm, and in the
community buildbot farm.

See:


http://www.python.org/dev/buildbot/trunk/sparc%20solaris10%20gcc%20trunk/builds/1960/step-test/0

http://www.python.org/dev/buildbot/community/trunk/sparc%20Solaris%2010%20trunk/builds/484/step-test/0

Grig

--
http://agiletesting.blogspot.com
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/jseutter%40gmail.com

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


[Python-Dev] test_expat.py and unittest

2007-03-20 Thread Jerry Seutter

Hi,

I have been working on converting some of the older test files to use
unittest.  test_expat.py has a section like:

class Outputter:
   def StartElementHandler(self, name, attrs):
   print 'Start element:\n\t', repr(name), sortdict(attrs)

   def EndElementHandler(self, name):
   print 'End element:\n\t', repr(name)

   def CharacterDataHandler(self, data):
   data = data.strip()
   if data:
   print 'Character data:'
   print '\t', repr(data)

   def ProcessingInstructionHandler(self, target, data):
   print 'PI:\n\t', repr(target), repr(data)

   def StartNamespaceDeclHandler(self, prefix, uri):
   print 'NS decl:\n\t', repr(prefix), repr(uri)
   snip

...where it defines a set of handlers for an xml document that prints the
output to stdout.  The test then parses an xml document using this class and
the stdout output is compared to a file.  There are several lines of text on
stdout to be compared:

PI:
   'xml-stylesheet' 'href=stylesheet.css'
Comment:
   ' comment data '
Notation declared: ('notation', None, 'notation.jpeg', None)
Unparsed entity decl:
   ('unparsed_entity', None, 'entity.file', None, 'notation')
Start element:
   'root' {'attr1': 'value1', 'attr2': 'value2\xe1\xbd\x80'}
NS decl:
   'myns' 'http://www.python.org/namespace'
Start element:
   'http://www.python.org/namespace!subelement' {}
Character data:
   'Contents of subelements'
End element:
   'http://www.python.org/namespace!subelement'
End of NS decl:
   'myns'
Start element:
   'sub2' {}
Start of CDATA section
Character data:
   'contents of CDATA section'
End of CDATA section
End element:
   'sub2'
External entity ref: (None, 'entity.file', None)
End element:
   'root'


unittest does not seem well suited to this type of testing, because the
stdout output comparison is testing many different pieces of functionality.
Some subset of it is probably even important.  To do this same testing with
unittest would require many lines of self.assertEquals(expected_string,
string_from_stdout).

Does anyone have ideas on how this can be tested in a manner that is not as
brittle as the stdout tests, but doesn't require writing significantly more
test code?  Or if not, is converting this file to use unittest a bad idea?

Jerry Seutter
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com