diff options
author | Florian Bruhin <me@the-compiler.org> | 2021-01-11 22:22:30 +0100 |
---|---|---|
committer | Florian Bruhin <me@the-compiler.org> | 2021-01-13 20:26:41 +0100 |
commit | c970c6335521fee359c1a68c0431c612631e73fb (patch) | |
tree | 1062d9ffd9fbfcafc0753308b8e7a15a5f5f6920 /tests/helpers/fixtures.py | |
parent | 4b7d52ae7cdf52ebef038b4a90b9fe95ab002105 (diff) | |
download | qutebrowser-c970c6335521fee359c1a68c0431c612631e73fb.tar.gz qutebrowser-c970c6335521fee359c1a68c0431c612631e73fb.zip |
dataclasses: Initial switch
See #6023
Diffstat (limited to 'tests/helpers/fixtures.py')
-rw-r--r-- | tests/helpers/fixtures.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/helpers/fixtures.py b/tests/helpers/fixtures.py index b814a6ea7..c62c9960b 100644 --- a/tests/helpers/fixtures.py +++ b/tests/helpers/fixtures.py @@ -34,7 +34,7 @@ import types import mimetypes import os.path -import attr +import dataclasses import pytest import py.path # pylint: disable=no-name-in-module from PyQt5.QtCore import QSize, Qt @@ -87,12 +87,12 @@ class WinRegistryHelper: """Helper class for win_registry.""" - @attr.s + @dataclasses.dataclass class FakeWindow: """A fake window object for the registry.""" - registry = attr.ib() + registry: objreg.ObjectRegistry def windowTitle(self): return 'window title - qutebrowser' @@ -276,11 +276,11 @@ def web_tab(request): def _generate_cmdline_tests(): """Generate testcases for test_split_binding.""" - @attr.s + @dataclasses.dataclass class TestCase: - cmd = attr.ib() - valid = attr.ib() + cmd: str + valid: bool separators = [';;', ' ;; ', ';; ', ' ;;'] invalid = ['foo', ''] |