Skip to content

Commit

Permalink
type annotation and spread out implementation to see if it's crashing
Browse files Browse the repository at this point in the history
This commit was sponsored by Matt Campbell, hacklschorsch, and my
other patrons.  If you want to join them, you can support my work at
https://glyph.im/patrons/.
  • Loading branch information
glyph committed Aug 15, 2024
1 parent a810e6f commit 35fedb4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions automat/_test/test_visualize.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,12 +252,14 @@ class IntegrationTests(TestCase):
Automat.
"""

def test_validGraphviz(self):
def test_validGraphviz(self) -> None:
"""
C{graphviz} emits valid graphviz data.
"""
digraph = sampleMachine().asDigraph()
text = "".join(digraph).encode("utf-8")
p = subprocess.Popen("dot", stdin=subprocess.PIPE, stdout=subprocess.PIPE)
out, err = p.communicate("".join(sampleMachine().asDigraph()).encode("utf-8"))
out, err = p.communicate(text)
self.assertEqual(p.returncode, 0)


Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ deps =
pytest

commands =
{extras,noextras}: coverage run --parallel --source automat -m pytest -rfEsx automat/_test
{extras,noextras}: coverage run --parallel --source automat -m pytest -s -rfEsx automat/_test
mypy: mypy {posargs:automat}

depends =
Expand Down

0 comments on commit 35fedb4

Please sign in to comment.