M docs/tutorial.rst => docs/tutorial.rst +1 -1
@@ 121,7 121,7 @@ More example for `pytest <http://pytest.org>`_:
return dict(os.environ, LANG='C')
- @pytest.yield_fixture
+ @pytest.fixture
def vim(request, env):
with headlessvim.open(args='-N -u /etc/vim/vimrc', env=env) as vim:
vim.install_plugin('fixtures/spam', 'plugin/spam.vim')
M headlessvim/__init__.py => headlessvim/__init__.py +3 -2
@@ 93,7 93,7 @@ class Vim(object):
def __setattr__(self, name, value):
if name == 'mode':
self.set_mode(value)
- super(Vim, self).__setattr__(name, value)
+ super().__setattr__(name, value)
def close(self):
"""
@@ 335,7 335,8 @@ class Vim(object):
:return: (lines, columns) tuple of a screen connected to *Vim*.
:rtype: (int, int)
"""
- return self._swap(self._screen.size)
+ size = (self._screen.lines, self._screen.columns)
+ return self._swap(size)
@screen_size.setter
def screen_size(self, size):
M headlessvim/_version.py => headlessvim/_version.py +1 -1
@@ 6,4 6,4 @@ __all__ = ['__author__', '__email__', '__version__']
__author__ = 'Ryosuke Ito'
__email__ = 'rito.0305@gmail.com'
-__version__ = '0.0.5'
+__version__ = '0.0.6'
M headlessvim/runtimepath.py => headlessvim/runtimepath.py +1 -1
@@ 9,7 9,7 @@ import collections
import weakref
-class RuntimePath(collections.MutableSequence):
+class RuntimePath(collections.abc.MutableSequence):
def __init__(self, vim):
"""
:param vim: ``Vim`` object which owns this object.
M setup.cfg => setup.cfg +1 -1
@@ 1,4 1,4 @@
-[pytest]
+[tool:pytest]
norecursedirs =
.git
build
M setup.py => setup.py +1 -5
@@ 38,11 38,7 @@ setup(
classifiers=[
'Development Status :: 3 - Alpha',
'Topic :: Software Development :: Testing',
- 'Programming Language :: Python :: 2.6',
- 'Programming Language :: Python :: 2.7',
- 'Programming Language :: Python :: 3.2',
- 'Programming Language :: Python :: 3.3',
- 'Programming Language :: Python :: 3.4',
+ 'Programming Language :: Python :: 3.11',
'License :: OSI Approved :: MIT License',
],
author=__author__,
M tests/test_headlessvim.py => tests/test_headlessvim.py +1 -1
@@ 19,7 19,7 @@ def unterminated_vim(request, env):
return open(env=env)
-@pytest.yield_fixture
+@pytest.fixture
def vim(request, unterminated_vim):
vim = unterminated_vim
yield vim
M tests/test_process.py => tests/test_process.py +1 -1
@@ 23,7 23,7 @@ def unterminated_process(request, default_args, env):
return Process('vim', default_args, env)
-@pytest.yield_fixture
+@pytest.fixture
def process(request, unterminated_process):
process = unterminated_process
yield process