Skip to content

Commit

Permalink
Use os.path instead of path.py
Browse files Browse the repository at this point in the history
  • Loading branch information
mmaslowskicc committed Jan 23, 2017
1 parent 7d67411 commit d42ee6a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
1 change: 0 additions & 1 deletion requirements-test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,4 @@ pycodestyle==2.2.0
mccabe==0.5.3
pyroma==2.2
pytest==3.0.6 # rq.filter: !=2.9.0,!=2.9.1,!=2.9.2
path.py==10.0
port-for==0.3.1
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ def read(fname):
'pytest>=3.0.0',
'mirakuru',
'elasticsearch',
'path.py>=6.2',
'port-for',
]

Expand Down
19 changes: 11 additions & 8 deletions src/pytest_elasticsearch/factories.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
# You should have received a copy of the GNU Lesser General Public License
# along with pytest-elasticsearch. If not, see <http://www.gnu.org/licenses/>.
"""Fixture factories."""
import os.path
import shutil
from tempfile import gettempdir

import pytest
from path import Path

from elasticsearch import Elasticsearch
from mirakuru import HTTPExecutor
Expand Down Expand Up @@ -80,7 +80,7 @@ def elasticsearch_proc(executable='/usr/share/elasticsearch/bin/elasticsearch',
@pytest.fixture(scope='session')
def elasticsearch_proc_fixture(request):
"""Elasticsearch process starting fixture."""
tmpdir = Path(gettempdir())
tmpdir = gettempdir()
config = return_config(request)

elasticsearch_host = host or config['host']
Expand All @@ -97,13 +97,16 @@ def elasticsearch_proc_fixture(request):
config['network_publish_host']

logsdir = elasticsearch_logsdir or config['logsdir']
logs_path = Path(logsdir) / '{prefix}elasticsearch_{port}_logs'.format(
prefix=elasticsearch_logs_prefix,
port=elasticsearch_port
)
logs_path = os.path.join(
logsdir, '{prefix}elasticsearch_{port}_logs'.format(
prefix=elasticsearch_logs_prefix,
port=elasticsearch_port
))

pidfile = tmpdir / 'elasticsearch.{0}.pid'.format(elasticsearch_port)
home_path = tmpdir / 'elasticsearch_{0}'.format(elasticsearch_port)
pidfile = os.path.join(
tmpdir, 'elasticsearch.{0}.pid'.format(elasticsearch_port))
home_path = os.path.join(
tmpdir, 'elasticsearch_{0}'.format(elasticsearch_port))
work_path = '{0}_tmp'.format(home_path)

if discovery_zen_ping_multicast_enabled is not None:
Expand Down

0 comments on commit d42ee6a

Please sign in to comment.