parameters: (self)
docstring: Test remove
docstring_summary: Test remove
docstring_tokens: Test remove
function: def test_remove(self):
          """Test remove"""
          # remove non-existing attribute
          self.assertEqual(self.doc.remove('a'), False, 'Failed remove')
          
          # remove single item attribute
          self.doc.set('a', 1)
          self.assertEqual(self.doc.remove('a'), True, 'Failed remove')
          self.assertEqual(self.doc.has('a'), False, 'Failed remove')
          
          # remove item from multi-valued attribute
          self.doc.set('a', [1, 2, 3], multi=True)
          self.assertEqual(self.doc.remove('a'), True, 'Failed remove')
          self.assertEqual(self.doc.get('a'), [2, 3], 'Failed remove')
          
          # remove non-zero index
          self.assertEqual(self.doc.remove('a', 1), True, 'Failed remove')
          self.assertEqual(self.doc.get('a'), 2, 'Failed remove')
          
          # remove non-existing index
          self.assertEqual(self.doc.remove('a', 10), False, 'Failed remove')
          self.assertEqual(self.doc.get('a'), 2, 'Failed remove')
function_tokens: def test_remove ( self ) : # remove non-existing attribute self . assertEqual ( self . doc . remove ( 'a' ) , False , 'Failed remove' ) # remove single item attribute self . doc . set ( 'a' , 1 ) self . assertEqual ( self . doc . remove ( 'a' ) , True , 'Failed remove' ) self . assertEqual ( self . doc . has ( 'a' ) , False , 'Failed remove' ) # remove item from multi-valued attribute self . doc . set ( 'a' , [ 1 , 2 , 3 ] , multi = True ) self . assertEqual ( self . doc . remove ( 'a' ) , True , 'Failed remove' ) self . assertEqual ( self . doc . get ( 'a' ) , [ 2 , 3 ] , 'Failed remove' ) # remove non-zero index self . assertEqual ( self . doc . remove ( 'a' , 1 ) , True , 'Failed remove' ) self . assertEqual ( self . doc . get ( 'a' ) , 2 , 'Failed remove' ) # remove non-existing index self . assertEqual ( self . doc . remove ( 'a' , 10 ) , False , 'Failed remove' ) self . assertEqual ( self . doc . get ( 'a' ) , 2 , 'Failed remove' )