mirror of
https://github.com/veekun/pokedex.git
synced 2024-08-20 18:16:34 +00:00
Mark MoveEffect.effect as a Markdown column.
Also relax the appropriate test
This commit is contained in:
parent
f42f5f32d0
commit
10d9bc83b3
2 changed files with 3 additions and 2 deletions
|
@ -805,7 +805,7 @@ create_translation_table('move_effect_prose', MoveEffect, 'prose',
|
|||
short_effect = Column(Unicode(256), nullable=True,
|
||||
info=dict(description="A short summary of the effect", format='plaintext')),
|
||||
effect = Column(Unicode(5120), nullable=True,
|
||||
info=dict(description="A detailed description of the effect", format='plaintext')),
|
||||
info=dict(description="A detailed description of the effect", format='markdown')),
|
||||
)
|
||||
|
||||
class MoveEffectChangelog(TableBase):
|
||||
|
|
|
@ -181,7 +181,8 @@ def test_texts():
|
|||
if format not in good_formats:
|
||||
raise AssertionError(assert_text % column)
|
||||
is_markdown = isinstance(column.type, markdown.MarkdownColumn)
|
||||
if is_markdown != (format == 'markdown'):
|
||||
if is_markdown and (format != 'markdown'):
|
||||
# Note: regular string with markdown syntax is allowed
|
||||
raise AssertionError('%s: markdown format/column type mismatch' % column)
|
||||
if (format != 'identifier') and (column.name == 'identifier'):
|
||||
raise AssertionError('%s: identifier column name/type mismatch' % column)
|
||||
|
|
Loading…
Reference in a new issue