~ubuntu-branches/ubuntu/precise/cython/precise

« back to all changes in this revision

Viewing changes to tests/run/iteratorexception.pyx

  • Committer: Bazaar Package Importer
  • Author(s): Python Applications Packaging Team, Ryan Kavanagh, Jakub Wilk, Piotr Ożarowski
  • Date: 2009-08-10 23:18:51 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20090810231851-i6f7mr1ij1h2czkp
Tags: 0.11.2-1
[ Ryan Kavanagh ]
* New upstream release (Closes: #525620, #536213)

[ Jakub Wilk ]
* debian/rules: remove generated files.

[ Piotr Ożarowski ]
* Standards-Version bumped to 3.8.2 (no change needed)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
__doc__ = """
 
1
__doc__ = u"""
2
2
    >>> f()
3
3
"""
4
4
 
5
5
class IteratorAndIterateable:
6
6
    def next(self):
7
 
        raise ValueError("")
 
7
        raise ValueError
 
8
    def __next__(self):
 
9
        raise ValueError
8
10
    def __iter__(self):
9
11
        return self
10
12
 
12
14
    try:
13
15
        for x in IteratorAndIterateable():
14
16
            pass
15
 
        assert False, "Should not reach this point, iterator has thrown exception"
 
17
        assert False, u"Should not reach this point, iterator has thrown exception"
16
18
    except ValueError:
17
19
        pass