Skip to content
This repository has been archived by the owner on Mar 22, 2021. It is now read-only.

Commit

Permalink
isort / flake8 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Shahar Evron committed Apr 27, 2020
1 parent 3f4643c commit ee299a6
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
__pycache__
/.venv*
/*.egg-info
.*.swp
*.swp
2 changes: 2 additions & 0 deletions pytest_ckan/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
the implementation bundled in this package
"""

# flake8: noqa

try:
from ckan.tests.pytest_ckan.ckan_setup import *
from ckan.tests.pytest_ckan.fixtures import *
Expand Down
20 changes: 10 additions & 10 deletions pytest_ckan/impl/fixtures.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# -*- coding: utf-8 -*-
import pytest

import ckan.lib.search as search
import ckan.tests.helpers as test_helpers
from ckan import plugins
from ckan.common import config
from ckan.lib import search
from ckan.tests import helpers as test_helpers


@pytest.fixture
Expand Down Expand Up @@ -130,14 +130,14 @@ def with_plugins(ckan_config):
:end-before: # END-CONFIG-OVERRIDE
"""
plugins = ckan_config["ckan.plugins"].split()
for plugin in plugins:
if not ckan.plugins.plugin_loaded(plugin):
ckan.plugins.load(plugin)
configured_plugins = ckan_config["ckan.plugins"].split()
for plugin in configured_plugins:
if not plugins.plugin_loaded(plugin):
plugins.load(plugin)
yield
for plugin in reversed(plugins):
if ckan.plugins.plugin_loaded(plugin):
ckan.plugins.unload(plugin)
for plugin in reversed(configured_plugins):
if plugins.plugin_loaded(plugin):
plugins.unload(plugin)


@pytest.fixture
Expand Down
1 change: 1 addition & 0 deletions pytest_ckan/impl/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import sys

import pkg_resources

import pylons
from paste.deploy import loadapp
from pylons.i18n.translation import _get_translator
Expand Down

0 comments on commit ee299a6

Please sign in to comment.