Skip to content

Commit

Permalink
fix backward compatibility issues
Browse files Browse the repository at this point in the history
  • Loading branch information
aleneum committed Mar 16, 2020
1 parent 20abb89 commit 70ecd17
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/test_graphviz.py
Expand Up @@ -165,7 +165,10 @@ def test_loops(self):
dot_string = g1.string()
else:
dot_string = g1.source
self.assertRegex(dot_string, r'A\s+->A\s+\[label="reflexive | fixed \[internal\]"\]')
try:
self.assertRegex(dot_string, r'A\s+->A\s+\[label="reflexive | fixed \[internal\]"\]')
except AttributeError: # Python 2 backwards compatibility
self.assertRegexpMatches(dot_string, 'A\s+->A\s+\[label="reflexive | fixed \[internal\]"\]')

def test_roi(self):
m = self.machine_cls(states=['A', 'B', 'C', 'D', 'E', 'F'], initial='A', use_pygraphviz=self.use_pygraphviz)
Expand Down
1 change: 1 addition & 0 deletions transitions/extensions/nesting.py
@@ -1,3 +1,4 @@
# -*- coding: utf-8 -*-
from collections import OrderedDict, defaultdict
import copy
from functools import partial, reduce
Expand Down

0 comments on commit 70ecd17

Please sign in to comment.