Changeset 400

Show
Ignore:
Timestamp:
09/17/07 15:07:34 (1 year ago)
Author:
bjourne
Message:

Add test to ensure that IImageTool is not instantiable.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • pygtkimageview/tests/test_module.py

    r397 r400  
    217217    assert hasattr(gtkimageview, 'DRAW_METHOD_SCALE') 
    218218    assert hasattr(gtkimageview, 'DRAW_METHOD_SCROLL') 
    219      
    220      
    221      
     219 
     220def test_incomplete_iimage_tool(): 
     221    ''' 
     222    Ensure that NotImplementedError is raised if an attempt is made to 
     223    instantiate an incomplete IImageTool. 
     224    ''' 
     225    class Foo(gtkimageview.IImageTool): 
     226        pass 
     227    try: 
     228        Foo() 
     229        assert False 
     230    except NotImplementedError: 
     231        assert True 
     232     
     233     
     234