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):
|
class Cache(object):
|
||||||
|
|
||||||
def __init__(self, config):
|
def __init__(self, config):
|
||||||
self.config = config
|
self.config = config
|
||||||
self._cachedir = Cache.cache_dir_from_config(config)
|
self._cachedir = Cache.cache_dir_from_config(config)
|
||||||
|
@ -214,7 +215,9 @@ class NFPlugin(object):
|
||||||
|
|
||||||
items[:] = self._get_increasing_order(
|
items[:] = self._get_increasing_order(
|
||||||
six.itervalues(new_items)
|
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)]
|
self.cached_nodeids = [x.nodeid for x in items if isinstance(x, pytest.Item)]
|
||||||
|
|
||||||
def _get_increasing_order(self, items):
|
def _get_increasing_order(self, items):
|
||||||
|
|
|
@ -1,15 +1,11 @@
|
||||||
from __future__ import absolute_import, division, print_function
|
from __future__ import absolute_import, division, print_function
|
||||||
import sys
|
|
||||||
import py
|
|
||||||
import _pytest
|
import _pytest
|
||||||
import pytest
|
|
||||||
import os
|
|
||||||
import shutil
|
|
||||||
|
|
||||||
pytest_plugins = ("pytester",)
|
pytest_plugins = ("pytester",)
|
||||||
|
|
||||||
|
|
||||||
class Helper(object):
|
class Helper(object):
|
||||||
|
|
||||||
def check_readme(self, testdir):
|
def check_readme(self, testdir):
|
||||||
config = testdir.parseconfigure()
|
config = testdir.parseconfigure()
|
||||||
readme = config.cache._cachedir.join("README.md")
|
readme = config.cache._cachedir.join("README.md")
|
||||||
|
@ -17,6 +13,7 @@ class Helper(object):
|
||||||
|
|
||||||
|
|
||||||
class TestReadme(Helper):
|
class TestReadme(Helper):
|
||||||
|
|
||||||
def test_readme_passed(self, testdir):
|
def test_readme_passed(self, testdir):
|
||||||
testdir.tmpdir.join("test_a.py").write(
|
testdir.tmpdir.join("test_a.py").write(
|
||||||
_pytest._code.Source(
|
_pytest._code.Source(
|
||||||
|
@ -26,8 +23,8 @@ class TestReadme(Helper):
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
result = testdir.runpytest()
|
testdir.runpytest()
|
||||||
assert self.check_readme(testdir) == True
|
assert self.check_readme(testdir) is True
|
||||||
|
|
||||||
def test_readme_failed(self, testdir):
|
def test_readme_failed(self, testdir):
|
||||||
testdir.tmpdir.join("test_a.py").write(
|
testdir.tmpdir.join("test_a.py").write(
|
||||||
|
@ -38,5 +35,5 @@ class TestReadme(Helper):
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
result = testdir.runpytest()
|
testdir.runpytest()
|
||||||
assert self.check_readme(testdir) == True
|
assert self.check_readme(testdir) is True
|
||||||
|
|
Loading…
Reference in New Issue