~ubuntu-branches/ubuntu/oneiric/lxml/oneiric

« back to all changes in this revision

Viewing changes to src/lxml/tests/test_io.py

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2009-08-27 09:09:23 UTC
  • mfrom: (1.3.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20090827090923-fwhvka191ir73s3x
Tags: 2.2.2-1
* New upstream version. Closes: #525961.
  - Includes html5parser. Closes: #521714.

Show diffs side-by-side

added added

removed removed

Lines of Context:
105
105
        finally:
106
106
            os.close(handle)
107
107
            os.remove(filename)
 
108
        
 
109
    def test_write_invalid_filename(self):
 
110
        filename = os.path.join(
 
111
            os.path.join('hopefullynonexistingpathname'),
 
112
            'invalid_file.xml')
 
113
        try:
 
114
            self.tree.write(filename)
 
115
        except IOError:
 
116
            pass
 
117
        else:
 
118
            self.assertTrue(
 
119
                False, "writing to an invalid file path should fail")
108
120
 
109
121
    def test_module_parse_gzipobject(self):
110
122
        # (c)ElementTree supports gzip instance as parse argument