#NEWLINE# def test_powerset( ) : #NEWLINE# #INDENT# A = FiniteSet ( ) #NEWLINE# pset = A . powerset ( ) #NEWLINE# assert ( len ( pset ) == 1 ) #NEWLINE# assert ( pset == FiniteSet ( S . EmptySet ) ) #NEWLINE# A = FiniteSet ( 1 , 2 ) #NEWLINE# pset = A . powerset ( ) #NEWLINE# assert ( len ( pset ) == ( 2 ** len ( A ) ) ) #NEWLINE# assert ( I == FiniteSet ( FiniteSet ( ) , FiniteSet ( 1 ) , FiniteSet ( 2 ) , A ) ) #NEWLINE# I = Interval ( 0 , 1 ) #NEWLINE# raises ( NotImplementedError , I . powerset )