Skip to content

Commit

Permalink
Merge 13a0cfa into d79d702
Browse files Browse the repository at this point in the history
  • Loading branch information
TalAmuyal committed Apr 28, 2021
2 parents d79d702 + 13a0cfa commit 79c96bb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/pytest_elasticsearch/executor.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Elasticsearch executor."""

import re
from subprocess import check_output
from subprocess import check_output, STDOUT

from mirakuru import HTTPExecutor
from pkg_resources import parse_version
Expand Down Expand Up @@ -81,7 +81,7 @@ def version(self):
"""
if not self._version:
try:
output = check_output([self.executable, '-Vv']).decode('utf-8')
output = check_output([self.executable, '-Vv'], stderr=STDOUT).decode('utf-8')
match = re.search(
r'Version: (?P<major>\d)\.(?P<minor>\d)\.(?P<patch>\d+)',
output
Expand Down
2 changes: 1 addition & 1 deletion tests/test_elastic.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def test_version_extraction(output, expected_version):
"""Verify if we can properly extract elasticsearch version."""
with mock.patch(
'pytest_elasticsearch.executor.check_output',
lambda *args: output.encode('utf8')
lambda *args, **kwargs: output.encode('utf8')
):
executor = ElasticSearchExecutor(
'elasticsearch',
Expand Down

0 comments on commit 79c96bb

Please sign in to comment.