fixed linting errors
ran black removed unused imports and variables
This commit is contained in:
parent
53d4710c62
commit
8f1d8ac970
|
@ -18,6 +18,7 @@ from os.path import sep as _sep, altsep as _altsep
|
|||
|
||||
|
||||
class Cache(object):
|
||||
|
||||
def __init__(self, config):
|
||||
self.config = config
|
||||
self._cachedir = Cache.cache_dir_from_config(config)
|
||||
|
@ -108,7 +109,7 @@ class Cache(object):
|
|||
content_readme = """# pytest cache directory #
|
||||
|
||||
This directory contains data from the pytest's cache plugin, \
|
||||
which provides the `--lf` and `--ff` options, as well as the `cache` fixture.
|
||||
which provides the `--lf` and `--ff` options, as well as the `cache` fixture.
|
||||
|
||||
**Do not** commit this to version control.
|
||||
|
||||
|
@ -214,7 +215,9 @@ class NFPlugin(object):
|
|||
|
||||
items[:] = self._get_increasing_order(
|
||||
six.itervalues(new_items)
|
||||
) + self._get_increasing_order(six.itervalues(other_items))
|
||||
) + self._get_increasing_order(
|
||||
six.itervalues(other_items)
|
||||
)
|
||||
self.cached_nodeids = [x.nodeid for x in items if isinstance(x, pytest.Item)]
|
||||
|
||||
def _get_increasing_order(self, items):
|
||||
|
|
|
@ -1,15 +1,11 @@
|
|||
from __future__ import absolute_import, division, print_function
|
||||
import sys
|
||||
import py
|
||||
import _pytest
|
||||
import pytest
|
||||
import os
|
||||
import shutil
|
||||
|
||||
pytest_plugins = ("pytester",)
|
||||
|
||||
|
||||
class Helper(object):
|
||||
|
||||
def check_readme(self, testdir):
|
||||
config = testdir.parseconfigure()
|
||||
readme = config.cache._cachedir.join("README.md")
|
||||
|
@ -17,6 +13,7 @@ class Helper(object):
|
|||
|
||||
|
||||
class TestReadme(Helper):
|
||||
|
||||
def test_readme_passed(self, testdir):
|
||||
testdir.tmpdir.join("test_a.py").write(
|
||||
_pytest._code.Source(
|
||||
|
@ -26,8 +23,8 @@ class TestReadme(Helper):
|
|||
"""
|
||||
)
|
||||
)
|
||||
result = testdir.runpytest()
|
||||
assert self.check_readme(testdir) == True
|
||||
testdir.runpytest()
|
||||
assert self.check_readme(testdir) is True
|
||||
|
||||
def test_readme_failed(self, testdir):
|
||||
testdir.tmpdir.join("test_a.py").write(
|
||||
|
@ -38,5 +35,5 @@ class TestReadme(Helper):
|
|||
"""
|
||||
)
|
||||
)
|
||||
result = testdir.runpytest()
|
||||
assert self.check_readme(testdir) == True
|
||||
testdir.runpytest()
|
||||
assert self.check_readme(testdir) is True
|
||||
|
|
Loading…
Reference in New Issue