~ubuntu-branches/ubuntu/lucid/python2.6/lucid

« back to all changes in this revision

Viewing changes to Lib/test/test_hotshot.py

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2010-03-11 13:30:19 UTC
  • mto: (10.1.13 sid)
  • mto: This revision was merged to the branch mainline in revision 44.
  • Revision ID: james.westby@ubuntu.com-20100311133019-sblbooa3uqrkoe70
Tags: upstream-2.6.5~rc2
ImportĀ upstreamĀ versionĀ 2.6.5~rc2

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
import os
4
4
import pprint
5
5
import unittest
 
6
import tempfile
6
7
import _hotshot
7
8
import gc
8
9
 
127
128
                os.remove(test_support.TESTFN)
128
129
 
129
130
    def test_logreader_eof_error(self):
130
 
        self.assertRaises((IOError, EOFError), _hotshot.logreader, ".")
 
131
        emptyfile = tempfile.NamedTemporaryFile()
 
132
        try:
 
133
            self.assertRaises((IOError, EOFError), _hotshot.logreader,
 
134
                              emptyfile.name)
 
135
        finally:
 
136
            emptyfile.close()
131
137
        gc.collect()
132
138
 
133
139
def test_main():