Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
Changelog
=========

UNRELEASED
----------

- #52: Move ``pylibmc`` and ``MySQLdb`` library imports to specific tests -- this makes it easier to test a subset of the ``pytest-services`` package without having to install all the dependencies.

2.2.2
-----

Expand Down
7 changes: 4 additions & 3 deletions tests/test_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@
import os.path
import socket

import pylibmc
import MySQLdb


def test_memcached(request, memcached, memcached_socket):
"""Test memcached service."""
import pylibmc

mc = pylibmc.Client([memcached_socket])
mc.set('some', 1)
assert mc.get('some') == 1
Expand All @@ -19,6 +18,8 @@ def test_memcached(request, memcached, memcached_socket):

def test_mysql(mysql, mysql_connection, mysql_socket):
"""Test mysql service."""
import MySQLdb

conn = MySQLdb.connect(user='root', unix_socket=mysql_socket)
assert conn

Expand Down