1. tomo cocoa
  2. pypyjvm


Armin Rigo  committed c73c899

Mark the test classes as _immutable_=True, to showcase what a real
implementation would look like.

  • Participants
  • Parent commits 9d9bba8
  • Branches generator-in-rpython

Comments (0)

Files changed (1)

File pypy/rpython/test/test_generator.py

View file
         # merging two different generators is not supported
         # right now, but we can use workarounds like here
         class MyGen:
+            _immutable_ = True
             def next(self):
                 raise NotImplementedError
         class MyG1(MyGen):
+            _immutable_ = True
             def __init__(self, a):
                 self._gen = self.g1(a)
             def next(self):
                 yield a + 1
                 yield a + 2
         class MyG2(MyGen):
+            _immutable_ = True
             def __init__(self):
                 self._gen = self.g2()
             def next(self):