This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ygale
Recipients akuchling, ygale
Date 2008-02-24.14:06:49
SpamBayes Score 0.0118793
Marked as misclassified No
Message-id <>
Sure. Here is a simple test case:

  def testUseCharacterStream(self):
    '''If the source is an InputSource with a character stream, use 
    src = xml.sax.xmlreader.InputSource(temp_file_name)
    prep = xml.sax.saxutils.prepare_input_source(src)
    self.failIf(prep.getCharacterStream() is None, "ignored character 

If "temp_file_name" is omitted, you'll get an
AttributeError, and if you put it in but the
file doesn't exist, you'll get an IOError.

I'm attaching an almost full set of tests.
It omits the case of a URL. You can easily
put that in if you have a handy function that
converts a file path to a file URL, with all
the fidgety stuff you need for Windows. (Does that
already exist somewhere?)

Unfortunately, I now see that the problem
is a bit deeper than this. There are two more
related bugs that need to be fixed before
this really works.

See #2174 and #2175.
Date User Action Args
2008-02-24 14:06:50ygalesetspambayes_score: 0.0118793 -> 0.0118793
recipients: + ygale, akuchling
2008-02-24 14:06:50ygalesetspambayes_score: 0.0118793 -> 0.0118793
messageid: <>
2008-02-24 14:06:49ygalelinkissue1483 messages
2008-02-24 14:06:49ygalecreate