Skip to content

Commit

Permalink
skipping graphviz test due to current conda issues
Browse files Browse the repository at this point in the history
  • Loading branch information
wkerzendorf committed Apr 3, 2018
1 parent 72e0712 commit c543f4c
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions tardis/plasma/tests/test_plasma_dot_tex.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,26 @@
import os
import pygraphviz as pgv
import pytest
from datetime import datetime

data_path = os.path.join('tardis', 'plasma', 'tests', 'data')


@pytest.mark.skipif(datetime.now() < datetime(2018, 10, 1),
reason="graphviz had trouble being installed via conda in "
"March 2018")
def test_write_dot(tmpdir, simulation_verysimple):
fname = str(tmpdir.mkdir('test_dot').join('plasma.dot'))
simulation_verysimple.plasma.write_to_dot(fname)
actual = pgv.AGraph(fname).to_string()
expected = pgv.AGraph(os.path.join(data_path, 'plasma_ref.dot')).to_string()
assert actual == expected


@pytest.mark.skipif(datetime.now() < datetime(2018, 10, 1),
reason="graphviz had trouble being installed via conda in "
"March 2018")
def test_write_tex(tmpdir, simulation_verysimple):
fname = str(tmpdir.mkdir('test_tex').join('plasma.tex'))
simulation_verysimple.plasma.write_to_tex(fname)
with open(fname, 'r') as fp1, open(os.path.join(data_path, 'plasma_ref.tex'), 'r') as fp2:
with open(fname, 'r') as fp1, open(
os.path.join(data_path, 'plasma_ref.tex'), 'r') as fp2:
assert fp1.readline() ==fp2.readline()

0 comments on commit c543f4c

Please sign in to comment.