Skip to content

Commit

Permalink
Changed tests to expect RawBlock instead of RawInline
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeffrey Russell authored and Jeffrey Russell committed Jul 19, 2020
1 parent 6bf19ca commit 5cdb188
Showing 1 changed file with 44 additions and 46 deletions.
90 changes: 44 additions & 46 deletions tests/test_div.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,23 +74,22 @@ def test_div():
],
[]
],
[
[
{
't': 'RawBlock',
'c': ['tex', '\\begin{test}']
},
{
't': 'Plain',
'c': [
{
't': 'RawInline',
'c': ['tex', '\\begin{test}\n']
},
{
'c': 'content',
't': 'Str'
},
{
't': 'RawInline',
'c': ['tex', '\n\\end{test}']
}
]
{
'c': 'content',
't': 'Str'
}],
't': 'Plain'
},
{
't': 'RawBlock',
'c': ['tex', '\\end{test}']
}
]
)))
Expand Down Expand Up @@ -230,6 +229,7 @@ def test_div_with_id():
}
]
)))

dest = json.loads(json.dumps(Div(
[
'identifier',
Expand All @@ -239,23 +239,22 @@ def test_div_with_id():
],
[]
],
[
[
{
't': 'RawBlock',
'c': ['tex', '\\begin{test}\n\\label{identifier}']
},
{
't': 'Plain',
'c': [
{
't': 'RawInline',
'c': ['tex', '\\begin{test}\n\\label{identifier}']
},
{
'c': 'content',
't': 'Str'
},
{
't': 'RawInline',
'c': ['tex', '\n\\end{test}']
}
]
{
'c': 'content',
't': 'Str'
}],
't': 'Plain'
},
{
't': 'RawBlock',
'c': ['tex', '\\end{test}']
}
]
)))
Expand Down Expand Up @@ -322,6 +321,7 @@ def test_div_with_title():
}
]
)))

dest = json.loads(json.dumps(Div(
[
'',
Expand All @@ -333,28 +333,26 @@ def test_div_with_title():
['title', 'theTitle']
]
],
[
[
{
't': 'RawBlock',
'c': ['tex', '\\begin{test}[theTitle]']
},
{
't': 'Plain',
'c': [
{
't': 'RawInline',
'c': ['tex', '\\begin{test}[theTitle]\n']
},
{
'c': 'content',
't': 'Str'
},
{
't': 'RawInline',
'c': ['tex', '\n\\end{test}']
}
]
{
'c': 'content',
't': 'Str'
}],
't': 'Plain'
},
{
't': 'RawBlock',
'c': ['tex', '\\end{test}']
}
]
)))

pandoc_latex_environment.environment(src['t'], src['c'], 'latex', meta)

print(json.loads(json.dumps(src)))
assert json.loads(json.dumps(src)) == dest

0 comments on commit 5cdb188

Please sign in to comment.