diff options
Diffstat (limited to 'test/test_python_application.py')
-rw-r--r-- | test/test_python_application.py | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/test/test_python_application.py b/test/test_python_application.py index 41f6f538..48c3d603 100644 --- a/test/test_python_application.py +++ b/test/test_python_application.py @@ -5,17 +5,13 @@ import re import time import pytest + from unit.applications.lang.python import TestApplicationPython -from unit.option import option class TestPythonApplication(TestApplicationPython): prerequisites = {'modules': {'python': 'all'}} - def findall(self, pattern): - with open(option.temp_dir + '/unit.log', 'r', errors='ignore') as f: - return re.findall(pattern, f.read()) - def test_python_application_variables(self): self.load('variables') @@ -31,7 +27,8 @@ Content-Type: text/html Connection: close custom-header: BLAH -%s""" % (len(body), body.encode()), +%s""" + % (len(body), body.encode()), raw=True, ) @@ -816,7 +813,11 @@ last line: 987654321 assert ['/new', *sys_path] == get_path(), 'check path update' set_path('["/blah1", "/blah2"]') - assert ['/blah1', '/blah2', *sys_path] == get_path(), 'check path array' + assert [ + '/blah1', + '/blah2', + *sys_path, + ] == get_path(), 'check path array' def test_python_application_path_invalid(self): self.load('path') |