Commit 509323c0 by Gabriel Falcao

python 2.5 does not support class decorators

parent 47de94f9
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
import sys
from mox import Mox from mox import Mox
from nose.tools import assert_equals from nose.tools import assert_equals
...@@ -229,6 +230,10 @@ def test_world_should_be_able_to_absorb_classs(): ...@@ -229,6 +230,10 @@ def test_world_should_be_able_to_absorb_classs():
u"world should be able to absorb class" u"world should be able to absorb class"
assert not hasattr(world, 'MyClass') assert not hasattr(world, 'MyClass')
if sys.version_info < (2, 5):
# python 2.5 doesn't support class decorators
return
@world.absorb @world.absorb
class MyClass: class MyClass:
pass pass
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment