def test__Sets_sentence_count_array(self, Story, sample_story_body_list):
     Story.setBody(sample_story_body_list)
     Story.processRawBody()
     sentence_count_array = Story.getSentenceCountArray()
     correct_sentence_count_array = np.array([9, 8, 7])
     npt.assert_array_equal(sentence_count_array,
                            correct_sentence_count_array)
 def test__Sets_semicolon_count_array(self, Story, sample_story_body_list):
     Story.setBody(sample_story_body_list)
     Story.processRawBody()
     semicolon_count_array = Story.getSemicolonCountArray()
     correct_semicolon_count_array = np.array([2, 2, 2])
     npt.assert_array_equal(semicolon_count_array,
                            correct_semicolon_count_array)
 def test__Converts_raw_body_to_list_of_paragraph_objects(
         self, Story, sample_story_body_list):
     Story.setBody(sample_story_body_list)
     Story.processRawBody()
     correct_sentence_count = 7
     result_sentence_count = Story.body[2].sentence_count
     assert result_sentence_count == correct_sentence_count
 def test__Push_paragraph_to_body_list(self, Story, sample_paragraph_list):
     from control_chart import Paragraph
     correct_sentence_count = 9
     p = Story.convertParagraphListToObject(sample_paragraph_list)
     Story.appendParagraphToBody(p)
     result_sentence_count = Story.body[0].sentence_count
     assert result_sentence_count == correct_sentence_count
def Story():
    from control_chart import Story
    return Story()
 def test__Sets_dash_count_array(self, Story, sample_story_body_list):
     Story.setBody(sample_story_body_list)
     Story.processRawBody()
     dash_count_array = Story.getDashCountArray()
     correct_dash_count_array = np.array([3, 3, 3])
     npt.assert_array_equal(dash_count_array, correct_dash_count_array)
 def test__Sets_total_paragraph_count(self, Story, sample_story_body_list):
     Story.setBody(sample_story_body_list)
     Story.processRawBody()
     result_paragraph_count = Story.getParagraphCount()
     correct_paragraph_count = 3
     assert result_paragraph_count == correct_paragraph_count
 def test__Sets_total_dash_count(self, Story, sample_story_body_list):
     Story.setBody(sample_story_body_list)
     Story.processRawBody()
     result_dash_count = Story.getDashCount()
     correct_dash_count = 9
     assert result_dash_count == correct_dash_count
 def test__Sets_total_semicolon_count(self, Story, sample_story_body_list):
     Story.setBody(sample_story_body_list)
     Story.processRawBody()
     result_semicolon_count = Story.getSemicolonCount()
     correct_semicolon_count = 6
     assert result_semicolon_count == correct_semicolon_count
 def test__Converts_paragraph_list_to_paragraph_object(
         self, Story, sample_paragraph_list):
     from control_chart import Paragraph
     p = Story.convertParagraphListToObject(sample_paragraph_list)
     assert p.sentence_count == 9
 def test__Identifies_not_new_line(self, Story, sample_paragraph_list):
     sample_list = ['a\n', '\n']
     answer = Story.isNewline(sample_list[0])
     assert answer == False
 def test__Identifies_new_line_in_paragraph_list(self, Story,
                                                 sample_paragraph_list):
     sample_list = ['a\n', '\n']
     answer = Story.isNewline(sample_list[1])
     assert answer == True
 def test__Sets_raw_story_body(self, Story, sample_story_body_list):
     correct_body = sample_story_body_list
     Story.setBody(sample_story_body_list)
     npt.assert_array_equal(Story.body_raw, correct_body)