<s> """<STR_LIT>""" <EOL> from __future__ import absolute_import <EOL> from unittest import skip <EOL> from nose . tools import raises <EOL> from plotly . exceptions import ( PlotlyError , PlotlyDictKeyError , <EOL> PlotlyDictValueError , PlotlyListEntryError ) <EOL> from plotly . graph_objs import Annotation , Annotations , Data , Figure , Layout <EOL> def setup ( ) : <EOL> import warnings <EOL> warnings . filterwarnings ( '<STR_LIT:ignore>' ) <EOL> def test_trivial ( ) : <EOL> assert Annotations ( ) == list ( ) <EOL> @ raises ( PlotlyError ) <EOL> def test_weird_instantiation ( ) : <EOL> print ( Annotations ( { } ) ) <EOL> def test_dict_instantiation ( ) : <EOL> Annotations ( [ { '<STR_LIT:text>' : '<STR_LIT>' } ] ) <EOL> @ raises ( PlotlyDictKeyError ) <EOL> def test_dict_instantiation_key_error ( ) : <EOL> print ( Annotations ( [ { '<STR_LIT>' : '<STR_LIT>' } ] ) ) <EOL> @ raises ( PlotlyDictValueError ) <EOL> def test_dict_instantiation_key_error ( ) : <EOL> print ( Annotations ( [ { '<STR_LIT>' : '<STR_LIT>' } ] ) ) <EOL> @ raises ( PlotlyListEntryError ) <EOL> def test_dict_instantiation_graph_obj_error_0 ( ) : <EOL> Annotations ( [ Data ( ) ] ) <EOL> @ raises ( PlotlyListEntryError ) <EOL> def test_dict_instantiation_graph_obj_error_2 ( ) : <EOL> Annotations ( [ Annotations ( ) ] ) <EOL> def test_validate ( ) : <EOL> annotations = Annotations ( ) <EOL> annotations . validate ( ) <EOL> annotations += [ { '<STR_LIT:text>' : '<STR_LIT>' } ] <EOL> annotations . validate ( ) <EOL> annotations += [ { } , { } , { } ] <EOL> annotations . validate ( ) <EOL> @ raises ( PlotlyDictKeyError ) <EOL> def test_validate_error ( ) : <EOL> annotations = Annotations ( ) <EOL> annotations . append ( { '<STR_LIT>' : '<STR_LIT>' } ) <EOL> annotations . validate ( ) </s>
