Merge remote-tracking branch 'upstream/master' into configmerge
This commit is contained in:
commit
111846a909
@ -206,17 +206,7 @@ It's recommended to install `qt5.qtwebengine` and start with
|
|||||||
On openSUSE
|
On openSUSE
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
There are prebuilt RPMs available for Tumbleweed and Leap 42.1:
|
There are prebuilt RPMs available at https://software.opensuse.org/download.html?project=network&package=qutebrowser[OBS].
|
||||||
|
|
||||||
http://software.opensuse.org/download.html?project=home%3Aarpraher&package=qutebrowser[One Click Install]
|
|
||||||
|
|
||||||
Or add the repo manually:
|
|
||||||
|
|
||||||
----
|
|
||||||
# zypper addrepo http://download.opensuse.org/repositories/home:arpraher/openSUSE_Tumbleweed/home:arpraher.repo
|
|
||||||
# zypper refresh
|
|
||||||
# zypper install qutebrowser
|
|
||||||
----
|
|
||||||
|
|
||||||
On OpenBSD
|
On OpenBSD
|
||||||
----------
|
----------
|
||||||
|
@ -4,6 +4,6 @@ certifi==2017.7.27.1
|
|||||||
chardet==3.0.4
|
chardet==3.0.4
|
||||||
codecov==2.0.9
|
codecov==2.0.9
|
||||||
coverage==4.4.1
|
coverage==4.4.1
|
||||||
idna==2.5
|
idna==2.6
|
||||||
requests==2.18.2
|
requests==2.18.3
|
||||||
urllib3==1.22
|
urllib3==1.22
|
||||||
|
@ -18,6 +18,6 @@ packaging==16.8
|
|||||||
pep8-naming==0.4.1
|
pep8-naming==0.4.1
|
||||||
pycodestyle==2.3.1
|
pycodestyle==2.3.1
|
||||||
pydocstyle==1.1.1 # rq.filter: < 2.0.0
|
pydocstyle==1.1.1 # rq.filter: < 2.0.0
|
||||||
pyflakes==1.5.0
|
pyflakes==1.6.0
|
||||||
pyparsing==2.2.0
|
pyparsing==2.2.0
|
||||||
six==1.10.0
|
six==1.10.0
|
||||||
|
@ -3,6 +3,6 @@
|
|||||||
appdirs==1.4.3
|
appdirs==1.4.3
|
||||||
packaging==16.8
|
packaging==16.8
|
||||||
pyparsing==2.2.0
|
pyparsing==2.2.0
|
||||||
setuptools==36.2.5
|
setuptools==36.2.7
|
||||||
six==1.10.0
|
six==1.10.0
|
||||||
wheel==0.29.0
|
wheel==0.29.0
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
# This file is automatically generated by scripts/dev/recompile_requirements.py
|
# This file is automatically generated by scripts/dev/recompile_requirements.py
|
||||||
|
|
||||||
-e git+https://github.com/xoviat/pyinstaller.git@qtweb#egg=PyInstaller
|
-e git+https://github.com/pyinstaller/pyinstaller.git@develop#egg=PyInstaller
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
-e git+https://github.com/xoviat/pyinstaller.git@qtweb#egg=PyInstaller
|
-e git+https://github.com/pyinstaller/pyinstaller.git@develop#egg=PyInstaller
|
||||||
|
|
||||||
# remove @commit-id for scm installs
|
# remove @commit-id for scm installs
|
||||||
#@ replace: @.*# @qtweb#
|
#@ replace: @.*# @develop#
|
||||||
|
@ -4,15 +4,15 @@
|
|||||||
certifi==2017.7.27.1
|
certifi==2017.7.27.1
|
||||||
chardet==3.0.4
|
chardet==3.0.4
|
||||||
github3.py==0.9.6
|
github3.py==0.9.6
|
||||||
idna==2.5
|
idna==2.6
|
||||||
isort==4.2.15
|
isort==4.2.15
|
||||||
lazy-object-proxy==1.3.1
|
lazy-object-proxy==1.3.1
|
||||||
mccabe==0.6.1
|
mccabe==0.6.1
|
||||||
-e git+https://github.com/PyCQA/pylint.git#egg=pylint
|
-e git+https://github.com/PyCQA/pylint.git#egg=pylint
|
||||||
./scripts/dev/pylint_checkers
|
./scripts/dev/pylint_checkers
|
||||||
requests==2.18.2
|
requests==2.18.3
|
||||||
six==1.10.0
|
six==1.10.0
|
||||||
uritemplate==3.0.0
|
uritemplate==3.0.0
|
||||||
uritemplate.py==3.0.2
|
uritemplate.py==3.0.2
|
||||||
urllib3==1.22
|
urllib3==1.22
|
||||||
wrapt==1.10.10
|
wrapt==1.10.11
|
||||||
|
@ -4,15 +4,15 @@ astroid==1.5.3
|
|||||||
certifi==2017.7.27.1
|
certifi==2017.7.27.1
|
||||||
chardet==3.0.4
|
chardet==3.0.4
|
||||||
github3.py==0.9.6
|
github3.py==0.9.6
|
||||||
idna==2.5
|
idna==2.6
|
||||||
isort==4.2.15
|
isort==4.2.15
|
||||||
lazy-object-proxy==1.3.1
|
lazy-object-proxy==1.3.1
|
||||||
mccabe==0.6.1
|
mccabe==0.6.1
|
||||||
pylint==1.7.2
|
pylint==1.7.2
|
||||||
./scripts/dev/pylint_checkers
|
./scripts/dev/pylint_checkers
|
||||||
requests==2.18.2
|
requests==2.18.3
|
||||||
six==1.10.0
|
six==1.10.0
|
||||||
uritemplate==3.0.0
|
uritemplate==3.0.0
|
||||||
uritemplate.py==3.0.2
|
uritemplate.py==3.0.2
|
||||||
urllib3==1.22
|
urllib3==1.22
|
||||||
wrapt==1.10.10
|
wrapt==1.10.11
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# This file is automatically generated by scripts/dev/recompile_requirements.py
|
# This file is automatically generated by scripts/dev/recompile_requirements.py
|
||||||
|
|
||||||
docutils==0.13.1
|
docutils==0.14
|
||||||
pyroma==2.2
|
pyroma==2.2
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# This file is automatically generated by scripts/dev/recompile_requirements.py
|
# This file is automatically generated by scripts/dev/recompile_requirements.py
|
||||||
|
|
||||||
beautifulsoup4==4.6.0
|
beautifulsoup4==4.6.0
|
||||||
cheroot==5.7.0
|
cheroot==5.8.3
|
||||||
click==6.7
|
click==6.7
|
||||||
# colorama==0.3.9
|
# colorama==0.3.9
|
||||||
coverage==4.4.1
|
coverage==4.4.1
|
||||||
@ -12,7 +12,7 @@ Flask==0.12.2
|
|||||||
glob2==0.5
|
glob2==0.5
|
||||||
httpbin==0.5.0
|
httpbin==0.5.0
|
||||||
hunter==1.4.1
|
hunter==1.4.1
|
||||||
hypothesis==3.14.0
|
hypothesis==3.18.0
|
||||||
itsdangerous==0.24
|
itsdangerous==0.24
|
||||||
# Jinja2==2.9.6
|
# Jinja2==2.9.6
|
||||||
Mako==1.0.7
|
Mako==1.0.7
|
||||||
@ -20,7 +20,7 @@ Mako==1.0.7
|
|||||||
parse==1.8.2
|
parse==1.8.2
|
||||||
parse-type==0.3.4
|
parse-type==0.3.4
|
||||||
py==1.4.34
|
py==1.4.34
|
||||||
pytest==3.1.3
|
pytest==3.2.1
|
||||||
pytest-bdd==2.18.2
|
pytest-bdd==2.18.2
|
||||||
pytest-benchmark==3.1.1
|
pytest-benchmark==3.1.1
|
||||||
pytest-catchlog==1.2.2
|
pytest-catchlog==1.2.2
|
||||||
@ -35,5 +35,5 @@ pytest-travis-fold==1.2.0
|
|||||||
pytest-xvfb==1.0.0
|
pytest-xvfb==1.0.0
|
||||||
PyVirtualDisplay==0.2.1
|
PyVirtualDisplay==0.2.1
|
||||||
six==1.10.0
|
six==1.10.0
|
||||||
vulture==0.21
|
vulture==0.24
|
||||||
Werkzeug==0.12.2
|
Werkzeug==0.12.2
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
# This file is automatically generated by scripts/dev/recompile_requirements.py
|
# This file is automatically generated by scripts/dev/recompile_requirements.py
|
||||||
|
|
||||||
vulture==0.21
|
vulture==0.24
|
||||||
|
@ -49,6 +49,7 @@ qt_log_ignore =
|
|||||||
^Geoclue error: Process org\.freedesktop\.Geoclue\.Master exited with status 127
|
^Geoclue error: Process org\.freedesktop\.Geoclue\.Master exited with status 127
|
||||||
^Failed to create Geoclue client interface. Geoclue error: org\.freedesktop\.DBus\.Error\.Disconnected
|
^Failed to create Geoclue client interface. Geoclue error: org\.freedesktop\.DBus\.Error\.Disconnected
|
||||||
^QDBusConnection: name 'org.freedesktop.Geoclue.Master' had owner '' but we thought it was ':1.1'
|
^QDBusConnection: name 'org.freedesktop.Geoclue.Master' had owner '' but we thought it was ':1.1'
|
||||||
|
^Failed to create Geoclue client interface. Geoclue error: org\.freedesktop\.DBus\.Error\.Disconnected
|
||||||
^QObject::connect: Cannot connect \(null\)::stateChanged\(QNetworkSession::State\) to QNetworkReplyHttpImpl::_q_networkSessionStateChanged\(QNetworkSession::State\)
|
^QObject::connect: Cannot connect \(null\)::stateChanged\(QNetworkSession::State\) to QNetworkReplyHttpImpl::_q_networkSessionStateChanged\(QNetworkSession::State\)
|
||||||
^QXcbClipboard: Cannot transfer data, no data available
|
^QXcbClipboard: Cannot transfer data, no data available
|
||||||
^load glyph failed
|
^load glyph failed
|
||||||
|
@ -2036,8 +2036,9 @@ class CommandDispatcher:
|
|||||||
message.info(out)
|
message.info(out)
|
||||||
|
|
||||||
if file:
|
if file:
|
||||||
|
path = os.path.expanduser(js_code)
|
||||||
try:
|
try:
|
||||||
with open(js_code, 'r', encoding='utf-8') as f:
|
with open(path, 'r', encoding='utf-8') as f:
|
||||||
js_code = f.read()
|
js_code = f.read()
|
||||||
except OSError as e:
|
except OSError as e:
|
||||||
raise cmdexc.CommandError(str(e))
|
raise cmdexc.CommandError(str(e))
|
||||||
|
@ -29,7 +29,7 @@ def option():
|
|||||||
model = completionmodel.CompletionModel(column_widths=(20, 70, 10))
|
model = completionmodel.CompletionModel(column_widths=(20, 70, 10))
|
||||||
options = ((x.name, x.description, config.instance.get_str(x.name))
|
options = ((x.name, x.description, config.instance.get_str(x.name))
|
||||||
for x in configdata.DATA.values())
|
for x in configdata.DATA.values())
|
||||||
model.add_category(listcategory.ListCategory("Options", options))
|
model.add_category(listcategory.ListCategory("Options", sorted(options)))
|
||||||
return model
|
return model
|
||||||
|
|
||||||
|
|
||||||
@ -55,7 +55,8 @@ def value(optname, *_values):
|
|||||||
|
|
||||||
vals = opt.typ.complete()
|
vals = opt.typ.complete()
|
||||||
if vals is not None:
|
if vals is not None:
|
||||||
model.add_category(listcategory.ListCategory("Completions", vals))
|
model.add_category(listcategory.ListCategory("Completions",
|
||||||
|
sorted(vals)))
|
||||||
return model
|
return model
|
||||||
|
|
||||||
|
|
||||||
|
@ -60,33 +60,19 @@ class ListCategory(QSortFilterProxyModel):
|
|||||||
sortcol = 0
|
sortcol = 0
|
||||||
self.sort(sortcol)
|
self.sort(sortcol)
|
||||||
|
|
||||||
def lessThan(self, lindex, rindex):
|
def lessThan(self, _lindex, rindex):
|
||||||
"""Custom sorting implementation.
|
"""Custom sorting implementation.
|
||||||
|
|
||||||
Prefers all items which start with self._pattern. Other than that, uses
|
Prefers all items which start with self._pattern. Other than that, keep
|
||||||
normal Python string sorting.
|
items in their original order.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
lindex: The QModelIndex of the left item (*left* < right)
|
_lindex: The QModelIndex of the left item (*left* < right)
|
||||||
rindex: The QModelIndex of the right item (left < *right*)
|
rindex: The QModelIndex of the right item (left < *right*)
|
||||||
|
|
||||||
Return:
|
Return:
|
||||||
True if left < right, else False
|
True if left < right, else False
|
||||||
"""
|
"""
|
||||||
qtutils.ensure_valid(lindex)
|
|
||||||
qtutils.ensure_valid(rindex)
|
qtutils.ensure_valid(rindex)
|
||||||
|
|
||||||
left = self.srcmodel.data(lindex)
|
|
||||||
right = self.srcmodel.data(rindex)
|
right = self.srcmodel.data(rindex)
|
||||||
|
return not right.startswith(self._pattern)
|
||||||
leftstart = left.startswith(self._pattern)
|
|
||||||
rightstart = right.startswith(self._pattern)
|
|
||||||
|
|
||||||
if leftstart and rightstart:
|
|
||||||
return left < right
|
|
||||||
elif leftstart:
|
|
||||||
return True
|
|
||||||
elif rightstart:
|
|
||||||
return False
|
|
||||||
else:
|
|
||||||
return left < right
|
|
||||||
|
@ -49,4 +49,4 @@ def get_cmd_completions(include_hidden, include_aliases, prefix=''):
|
|||||||
bindings = ', '.join(cmd_to_keys.get(name, []))
|
bindings = ', '.join(cmd_to_keys.get(name, []))
|
||||||
cmdlist.append((name, "Alias for '{}'".format(cmd), bindings))
|
cmdlist.append((name, "Alias for '{}'".format(cmd), bindings))
|
||||||
|
|
||||||
return cmdlist
|
return sorted(cmdlist)
|
||||||
|
@ -421,7 +421,7 @@ class SessionManager(QObject):
|
|||||||
base, ext = os.path.splitext(filename)
|
base, ext = os.path.splitext(filename)
|
||||||
if ext == '.yml':
|
if ext == '.yml':
|
||||||
sessions.append(base)
|
sessions.append(base)
|
||||||
return sessions
|
return sorted(sessions)
|
||||||
|
|
||||||
@cmdutils.register(instance='session-manager')
|
@cmdutils.register(instance='session-manager')
|
||||||
@cmdutils.argument('name', completion=miscmodels.session)
|
@cmdutils.argument('name', completion=miscmodels.session)
|
||||||
|
@ -81,6 +81,8 @@ def distribution():
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
pretty = info.get('PRETTY_NAME', 'Unknown')
|
pretty = info.get('PRETTY_NAME', 'Unknown')
|
||||||
|
if pretty == 'Linux': # Thanks, Funtoo
|
||||||
|
pretty = info.get('NAME', pretty)
|
||||||
|
|
||||||
if 'VERSION_ID' in info:
|
if 'VERSION_ID' in info:
|
||||||
dist_version = pkg_resources.parse_version(info['VERSION_ID'])
|
dist_version = pkg_resources.parse_version(info['VERSION_ID'])
|
||||||
@ -88,8 +90,11 @@ def distribution():
|
|||||||
dist_version = None
|
dist_version = None
|
||||||
|
|
||||||
dist_id = info.get('ID', None)
|
dist_id = info.get('ID', None)
|
||||||
|
id_mappings = {
|
||||||
|
'funtoo': 'gentoo', # does not have ID_LIKE=gentoo
|
||||||
|
}
|
||||||
try:
|
try:
|
||||||
parsed = Distribution[dist_id]
|
parsed = Distribution[id_mappings.get(dist_id, dist_id)]
|
||||||
except KeyError:
|
except KeyError:
|
||||||
parsed = Distribution.unknown
|
parsed = Distribution.unknown
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ from qutebrowser.completion.models import listcategory
|
|||||||
|
|
||||||
('foo',
|
('foo',
|
||||||
[('foob', ''), ('fooc', ''), ('fooa', '')],
|
[('foob', ''), ('fooc', ''), ('fooa', '')],
|
||||||
[('fooa', ''), ('foob', ''), ('fooc', '')]),
|
[('foob', ''), ('fooc', ''), ('fooa', '')]),
|
||||||
|
|
||||||
# prefer foobar as it starts with the pattern
|
# prefer foobar as it starts with the pattern
|
||||||
('foo',
|
('foo',
|
||||||
|
@ -132,8 +132,8 @@ def quickmarks(quickmark_manager_stub):
|
|||||||
"""Pre-populate the quickmark-manager stub with some quickmarks."""
|
"""Pre-populate the quickmark-manager stub with some quickmarks."""
|
||||||
quickmark_manager_stub.marks = collections.OrderedDict([
|
quickmark_manager_stub.marks = collections.OrderedDict([
|
||||||
('aw', 'https://wiki.archlinux.org'),
|
('aw', 'https://wiki.archlinux.org'),
|
||||||
('ddg', 'https://duckduckgo.com'),
|
|
||||||
('wiki', 'https://wikipedia.org'),
|
('wiki', 'https://wikipedia.org'),
|
||||||
|
('ddg', 'https://duckduckgo.com'),
|
||||||
])
|
])
|
||||||
return quickmark_manager_stub
|
return quickmark_manager_stub
|
||||||
|
|
||||||
@ -245,16 +245,16 @@ def test_quickmark_completion(qtmodeltester, quickmarks):
|
|||||||
_check_completions(model, {
|
_check_completions(model, {
|
||||||
"Quickmarks": [
|
"Quickmarks": [
|
||||||
('aw', 'https://wiki.archlinux.org', None),
|
('aw', 'https://wiki.archlinux.org', None),
|
||||||
('ddg', 'https://duckduckgo.com', None),
|
|
||||||
('wiki', 'https://wikipedia.org', None),
|
('wiki', 'https://wikipedia.org', None),
|
||||||
|
('ddg', 'https://duckduckgo.com', None),
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize('row, removed', [
|
@pytest.mark.parametrize('row, removed', [
|
||||||
(0, 'aw'),
|
(0, 'aw'),
|
||||||
(1, 'ddg'),
|
(1, 'wiki'),
|
||||||
(2, 'wiki'),
|
(2, 'ddg'),
|
||||||
])
|
])
|
||||||
def test_quickmark_completion_delete(qtmodeltester, quickmarks, row, removed):
|
def test_quickmark_completion_delete(qtmodeltester, quickmarks, row, removed):
|
||||||
"""Test deleting a quickmark from the quickmark completion model."""
|
"""Test deleting a quickmark from the quickmark completion model."""
|
||||||
@ -281,17 +281,17 @@ def test_bookmark_completion(qtmodeltester, bookmarks):
|
|||||||
|
|
||||||
_check_completions(model, {
|
_check_completions(model, {
|
||||||
"Bookmarks": [
|
"Bookmarks": [
|
||||||
('http://qutebrowser.org', 'qutebrowser | qutebrowser', None),
|
|
||||||
('https://github.com', 'GitHub', None),
|
('https://github.com', 'GitHub', None),
|
||||||
('https://python.org', 'Welcome to Python.org', None),
|
('https://python.org', 'Welcome to Python.org', None),
|
||||||
|
('http://qutebrowser.org', 'qutebrowser | qutebrowser', None),
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize('row, removed', [
|
@pytest.mark.parametrize('row, removed', [
|
||||||
(0, 'http://qutebrowser.org'),
|
(0, 'https://github.com'),
|
||||||
(1, 'https://github.com'),
|
(1, 'https://python.org'),
|
||||||
(2, 'https://python.org'),
|
(2, 'http://qutebrowser.org'),
|
||||||
])
|
])
|
||||||
def test_bookmark_completion_delete(qtmodeltester, bookmarks, row, removed):
|
def test_bookmark_completion_delete(qtmodeltester, bookmarks, row, removed):
|
||||||
"""Test deleting a quickmark from the quickmark completion model."""
|
"""Test deleting a quickmark from the quickmark completion model."""
|
||||||
@ -325,14 +325,14 @@ def test_url_completion(qtmodeltester, web_history_populated,
|
|||||||
|
|
||||||
_check_completions(model, {
|
_check_completions(model, {
|
||||||
"Quickmarks": [
|
"Quickmarks": [
|
||||||
('https://duckduckgo.com', 'ddg', None),
|
|
||||||
('https://wiki.archlinux.org', 'aw', None),
|
('https://wiki.archlinux.org', 'aw', None),
|
||||||
('https://wikipedia.org', 'wiki', None),
|
('https://wikipedia.org', 'wiki', None),
|
||||||
|
('https://duckduckgo.com', 'ddg', None),
|
||||||
],
|
],
|
||||||
"Bookmarks": [
|
"Bookmarks": [
|
||||||
('http://qutebrowser.org', 'qutebrowser | qutebrowser', None),
|
|
||||||
('https://github.com', 'GitHub', None),
|
('https://github.com', 'GitHub', None),
|
||||||
('https://python.org', 'Welcome to Python.org', None),
|
('https://python.org', 'Welcome to Python.org', None),
|
||||||
|
('http://qutebrowser.org', 'qutebrowser | qutebrowser', None),
|
||||||
],
|
],
|
||||||
"History": [
|
"History": [
|
||||||
('https://github.com', 'https://github.com', '2016-05-01'),
|
('https://github.com', 'https://github.com', '2016-05-01'),
|
||||||
@ -384,12 +384,12 @@ def test_url_completion_delete_bookmark(qtmodeltester, bookmarks,
|
|||||||
|
|
||||||
# sanity checks
|
# sanity checks
|
||||||
assert model.data(parent) == "Bookmarks"
|
assert model.data(parent) == "Bookmarks"
|
||||||
assert model.data(idx) == 'https://github.com'
|
assert model.data(idx) == 'https://python.org'
|
||||||
assert 'https://github.com' in bookmarks.marks
|
assert 'https://github.com' in bookmarks.marks
|
||||||
|
|
||||||
len_before = len(bookmarks.marks)
|
len_before = len(bookmarks.marks)
|
||||||
model.delete_cur_item(idx)
|
model.delete_cur_item(idx)
|
||||||
assert 'https://github.com' not in bookmarks.marks
|
assert 'https://python.org' not in bookmarks.marks
|
||||||
assert len_before == len(bookmarks.marks) + 1
|
assert len_before == len(bookmarks.marks) + 1
|
||||||
|
|
||||||
|
|
||||||
@ -407,12 +407,12 @@ def test_url_completion_delete_quickmark(qtmodeltester,
|
|||||||
|
|
||||||
# sanity checks
|
# sanity checks
|
||||||
assert model.data(parent) == "Quickmarks"
|
assert model.data(parent) == "Quickmarks"
|
||||||
assert model.data(idx) == 'https://duckduckgo.com'
|
assert model.data(idx) == 'https://wiki.archlinux.org'
|
||||||
assert 'ddg' in quickmarks.marks
|
assert 'ddg' in quickmarks.marks
|
||||||
|
|
||||||
len_before = len(quickmarks.marks)
|
len_before = len(quickmarks.marks)
|
||||||
model.delete_cur_item(idx)
|
model.delete_cur_item(idx)
|
||||||
assert 'ddg' not in quickmarks.marks
|
assert 'aw' not in quickmarks.marks
|
||||||
assert len_before == len(quickmarks.marks) + 1
|
assert len_before == len(quickmarks.marks) + 1
|
||||||
|
|
||||||
|
|
||||||
@ -455,9 +455,9 @@ def test_session_completion(qtmodeltester, session_manager_stub):
|
|||||||
qtmodeltester.check(model)
|
qtmodeltester.check(model)
|
||||||
|
|
||||||
_check_completions(model, {
|
_check_completions(model, {
|
||||||
"Sessions": [('1', None, None),
|
"Sessions": [('default', None, None),
|
||||||
('2', None, None),
|
('1', None, None),
|
||||||
('default', None, None)]
|
('2', None, None)]
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
@ -372,7 +372,7 @@ class TestListSessions:
|
|||||||
(tmpdir / 'foo.yml').ensure()
|
(tmpdir / 'foo.yml').ensure()
|
||||||
(tmpdir / 'bar.yml').ensure()
|
(tmpdir / 'bar.yml').ensure()
|
||||||
sess_man = sessions.SessionManager(str(tmpdir))
|
sess_man = sessions.SessionManager(str(tmpdir))
|
||||||
assert sorted(sess_man.list_sessions()) == ['bar', 'foo']
|
assert sess_man.list_sessions() == ['bar', 'foo']
|
||||||
|
|
||||||
def test_with_other_files(self, tmpdir):
|
def test_with_other_files(self, tmpdir):
|
||||||
(tmpdir / 'foo.yml').ensure()
|
(tmpdir / 'foo.yml').ensure()
|
||||||
|
@ -164,6 +164,15 @@ from qutebrowser.browser import pdfjs
|
|||||||
version.DistributionInfo(
|
version.DistributionInfo(
|
||||||
id='manjaro', parsed=version.Distribution.manjaro,
|
id='manjaro', parsed=version.Distribution.manjaro,
|
||||||
version=None, pretty='Manjaro Linux')),
|
version=None, pretty='Manjaro Linux')),
|
||||||
|
# Funtoo
|
||||||
|
("""
|
||||||
|
ID="funtoo"
|
||||||
|
NAME="Funtoo GNU/Linux"
|
||||||
|
PRETTY_NAME="Linux"
|
||||||
|
""",
|
||||||
|
version.DistributionInfo(
|
||||||
|
id='funtoo', parsed=version.Distribution.gentoo,
|
||||||
|
version=None, pretty='Funtoo GNU/Linux')),
|
||||||
])
|
])
|
||||||
def test_distribution(tmpdir, monkeypatch, os_release, expected):
|
def test_distribution(tmpdir, monkeypatch, os_release, expected):
|
||||||
os_release_file = tmpdir / 'os-release'
|
os_release_file = tmpdir / 'os-release'
|
||||||
|
Loading…
Reference in New Issue
Block a user