<commit_before>"""
test_error_bars:
================

A module intended for use with Nose.

"""
from nose.tools import raises
from ...graph_objs.graph_objs import *
from ...exceptions import (PlotlyDictKeyError, PlotlyDictValueError,
                           PlotlyDataTypeError, PlotlyListEntryError)


def test_instantiate_error_x():
    ErrorX()
    ErrorX(array=[1, 2, 3],
           arrayminus=[2, 1, 2],
           color='red',
           copy_ystyle=False,
           opacity=.4,
           symmetric=False,
           thickness=2,
           traceref=0,  # TODO, what's this do again?
           type='percent',
           value=1,
           valueminus=4,
           visible=True,
           width=5)


def test_instantiate_error_y():
    ErrorY()
    ErrorY(array=[1, 2, 3],
           arrayminus=[2, 1, 2],
           color='red',
           opacity=.4,
           symmetric=False,
           thickness=2,
           traceref=0,  # TODO, what's this do again?
           type='percent',
           value=1,
           valueminus=4,
           visible=True,
           width=5)


@raises(PlotlyDictKeyError)
def test_key_error():
    ErrorX(value=0.1, typ='percent', color='red')<commit_msg>removed 'traceref' from errorbar tests, we don't have that key anymore.<commit_after>"""
test_error_bars:
================

A module intended for use with Nose.

"""
from nose.tools import raises
from ...graph_objs.graph_objs import *
from ...exceptions import (PlotlyDictKeyError, PlotlyDictValueError,
                           PlotlyDataTypeError, PlotlyListEntryError)


def test_instantiate_error_x():
    ErrorX()
    ErrorX(array=[1, 2, 3],
           arrayminus=[2, 1, 2],
           color='red',
           copy_ystyle=False,
           opacity=.4,
           symmetric=False,
           thickness=2,
           type='percent',
           value=1,
           valueminus=4,
           visible=True,
           width=5)


def test_instantiate_error_y():
    ErrorY()
    ErrorY(array=[1, 2, 3],
           arrayminus=[2, 1, 2],
           color='red',
           opacity=.4,
           symmetric=False,
           thickness=2,
           type='percent',
           value=1,
           valueminus=4,
           visible=True,
           width=5)


@raises(PlotlyDictKeyError)
def test_key_error():
    ErrorX(value=0.1, typ='percent', color='red')
{'fraction_non_alphanumeric': 0.12860780984719863, 'fraction_numerical': 0.021222410865874362, 'mean_word_length': 2.0140664961636827, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3741151', 'n_tokens_mistral': 754, 'n_tokens_neox': 717, 'n_words': 153}