Skip to content

Commit 88b9df4

Browse files
committed
[nginxctl/tests/test_parser.py] Add explicit __name__ with ast val
1 parent 7048a5e commit 88b9df4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

nginxctl/tests/test_parser.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
from __future__ import absolute_import, unicode_literals
22

3+
import ast
4+
import sys
35
import unittest
46
from copy import deepcopy
57
from functools import partial
@@ -19,7 +21,7 @@
1921

2022

2123
class TestParser(TestCase, object):
22-
__name__ = 'TestParser'
24+
__name__ = (ast.Str if sys.version_info[0] == 2 else ast.Constant)('TestParser')
2325
maxDiff = 1200
2426

2527
def setUp(self):

0 commit comments

Comments
 (0)