@snippet
def topic_exists(client, to_delete):
 TOPIC_NAME = ('topic_exists-%d' % (_millis(),))
 topic = client.topic(TOPIC_NAME)
 to_delete.append(topic)
 assert (not topic.exists())
 topic.create()
 assert topic.exists()

@ snippet def topic_exists ( client , to_delete ) : TOPIC_NAME = ( 'topic_exists-%d' % ( _millis ( ) , ) ) topic = client . topic ( TOPIC_NAME ) to_delete . append ( topic ) assert ( not topic . exists ( ) ) topic . create ( ) assert topic . exists ( )
test existence of a topic .