File tree Expand file tree Collapse file tree 1 file changed +29
-2
lines changed
Expand file tree Collapse file tree 1 file changed +29
-2
lines changed Original file line number Diff line number Diff line change @@ -318,6 +318,10 @@ def test_FileSet(self):
318318 fileSet .Validate ()
319319
320320
321+ class Attr (Attribute ):
322+ pass
323+
324+
321325class Attributes (TestCase ):
322326 def test_AddAttribute_WrongType (self ):
323327 fileSet = FileSet ("fileset" )
@@ -328,7 +332,30 @@ def test_AddAttribute_WrongType(self):
328332 def test_AddAttribute_Normal (self ):
329333 fileSet = FileSet ("fileset" )
330334
331- class Attr (Attribute ):
332- pass
335+ fileSet [Attr ] = 5
336+
337+ def test_GetAttribute_WrongType (self ):
338+ fileSet = FileSet ("fileset" )
339+ fileSet [Attr ] = 5
340+
341+ with self .assertRaises (TypeError ):
342+ _ = fileSet ["attr" ]
333343
344+ def test_GetAttribute_Normal (self ):
345+ fileSet = FileSet ("fileset" )
334346 fileSet [Attr ] = 5
347+
348+ _ = fileSet [Attr ]
349+
350+ def test_DelAttribute_WrongType (self ):
351+ fileSet = FileSet ("fileset" )
352+ fileSet [Attr ] = 5
353+
354+ with self .assertRaises (TypeError ):
355+ del fileSet ["attr" ]
356+
357+ def test_DelAttribute_Normal (self ):
358+ fileSet = FileSet ("fileset" )
359+ fileSet [Attr ] = 5
360+
361+ del fileSet [Attr ]
You can’t perform that action at this time.
0 commit comments