예제 #1
0
def test_copy_verse_range(out):
    '''should copy reference content for verse range'''
    yvs.main('111/psa.23.1-2')
    ref_content = out.getvalue()
    assert_regexp_matches(ref_content, 'Lorem')
    assert_regexp_matches(ref_content, 'nunc nulla')
    assert_not_regexp_matches(ref_content, 'fermentum')
def test_copy_verse_range(out):
    '''should copy reference content for verse range'''
    yvs.main('111/psa.23.1-2')
    ref_content = out.getvalue()
    assert_regexp_matches(ref_content, 'Lorem')
    assert_regexp_matches(ref_content, 'nunc nulla')
    assert_not_regexp_matches(ref_content, 'fermentum')
예제 #3
0
 def test_constraint(self):
     try:
         self.model((1, .5, 5, 5, 3, 3))
     except ModelInputException as e:
         assert_regexp_matches(e.message, self.c1_pattern)
         assert_not_regexp_matches(e.message, self.c2_pattern)
         assert_not_regexp_matches(e.message, self.c3_pattern)
         assert_not_regexp_matches(e.message, self.c4_pattern)
         assert_regexp_matches(e.message, self.c5_pattern)
         assert_regexp_matches(e.message, self.c6_pattern)
예제 #4
0
def test_copy_verse_range():
    """should copy reference content for verse range"""
    ref_content = yvs.get_copied_ref('111/psa.23.1-2')
    nose.assert_regexp_matches(ref_content, 'Lorem')
    nose.assert_regexp_matches(ref_content, 'nunc nulla')
    nose.assert_not_regexp_matches(ref_content, 'fermentum')
예제 #5
0
def test_versenumbers_range_middle():
    """should handle range labels when verse in middle of range is given"""
    ref_content = yvs.get_copied_ref('111/psa.23.8')
    nose.assert_regexp_matches(ref_content, r'7-9 dapibus et augue in,')
    nose.assert_not_regexp_matches(ref_content, r'#')
예제 #6
0
def test_versenumbers_range():
    """should handle verse range labels (used by versions like the MSG)"""
    ref_content = yvs.get_copied_ref('111/psa.23.7-9')
    nose.assert_regexp_matches(ref_content, r'7-9 dapibus et augue in,')
    nose.assert_not_regexp_matches(ref_content, r'#')
예제 #7
0
def test_versenumbers():
    """should honor the versenumbers preference"""
    ref_content = yvs.get_copied_ref('111/psa.23')
    nose.assert_regexp_matches(ref_content, r'5 fermentum')
    nose.assert_not_regexp_matches(ref_content, r'#')