id int64 0 458k | file_name stringlengths 4 119 | file_path stringlengths 14 227 | content stringlengths 24 9.96M | size int64 24 9.96M | language stringclasses 1
value | extension stringclasses 14
values | total_lines int64 1 219k | avg_line_length float64 2.52 4.63M | max_line_length int64 5 9.91M | alphanum_fraction float64 0 1 | repo_name stringlengths 7 101 | repo_stars int64 100 139k | repo_forks int64 0 26.4k | repo_open_issues int64 0 2.27k | repo_license stringclasses 12
values | repo_extraction_date stringclasses 433
values |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
38,400 | skip.py | phimpme_phimpme-generator/Phimpme/site-packages/nose/plugins/skip.py | """
This plugin installs a SKIP error class for the SkipTest exception.
When SkipTest is raised, the exception will be logged in the skipped
attribute of the result, 'S' or 'SKIP' (verbose) will be output, and
the exception will not be counted as an error or failure. This plugin
is enabled by default but may be disable... | 1,794 | Python | .py | 48 | 29.375 | 73 | 0.630035 | phimpme/phimpme-generator | 1,026 | 2 | 3 | GPL-3.0 | 9/5/2024, 5:15:29 PM (Europe/Amsterdam) |
38,401 | errorclass.py | phimpme_phimpme-generator/Phimpme/site-packages/nose/plugins/errorclass.py | """
ErrorClass Plugins
------------------
ErrorClass plugins provide an easy way to add support for custom
handling of particular classes of exceptions.
An ErrorClass plugin defines one or more ErrorClasses and how each is
handled and reported on. Each error class is stored in a different
attribute on the result, and... | 7,279 | Python | .py | 170 | 36.758824 | 81 | 0.673363 | phimpme/phimpme-generator | 1,026 | 2 | 3 | GPL-3.0 | 9/5/2024, 5:15:29 PM (Europe/Amsterdam) |
38,402 | allmodules.py | phimpme_phimpme-generator/Phimpme/site-packages/nose/plugins/allmodules.py | """Use the AllModules plugin by passing ``--all-modules`` or setting the
NOSE_ALL_MODULES environment variable to enable collection and execution of
tests in all python modules. Normal nose behavior is to look for tests only in
modules that match testMatch.
More information: :doc:`../doc_tests/test_allmodules/test_all... | 1,720 | Python | .py | 37 | 38.378378 | 78 | 0.653134 | phimpme/phimpme-generator | 1,026 | 2 | 3 | GPL-3.0 | 9/5/2024, 5:15:29 PM (Europe/Amsterdam) |
38,403 | testid.py | phimpme_phimpme-generator/Phimpme/site-packages/nose/plugins/testid.py | """
This plugin adds a test id (like #1) to each test name output. After
you've run once to generate test ids, you can re-run individual
tests by activating the plugin and passing the ids (with or
without the # prefix) instead of test names.
For example, if your normal test run looks like::
% nosetests -v
tests.t... | 9,641 | Python | .py | 259 | 28.181467 | 92 | 0.571229 | phimpme/phimpme-generator | 1,026 | 2 | 3 | GPL-3.0 | 9/5/2024, 5:15:29 PM (Europe/Amsterdam) |
38,404 | cover.py | phimpme_phimpme-generator/Phimpme/site-packages/nose/plugins/cover.py | """If you have Ned Batchelder's coverage_ module installed, you may activate a
coverage report with the ``--with-coverage`` switch or NOSE_WITH_COVERAGE
environment variable. The coverage report will cover any python source module
imported after the start of the test run, excluding modules that match
testMatch. If you ... | 10,762 | Python | .py | 228 | 33.157895 | 83 | 0.556422 | phimpme/phimpme-generator | 1,026 | 2 | 3 | GPL-3.0 | 9/5/2024, 5:15:29 PM (Europe/Amsterdam) |
38,405 | collect.py | phimpme_phimpme-generator/Phimpme/site-packages/nose/plugins/collect.py | """
This plugin bypasses the actual execution of tests, and instead just collects
test names. Fixtures are also bypassed, so running nosetests with the
collection plugin enabled should be very quick.
This plugin is useful in combination with the testid plugin (``--with-id``).
Run both together to get an indexed list ... | 3,113 | Python | .py | 79 | 31.240506 | 79 | 0.63796 | phimpme/phimpme-generator | 1,026 | 2 | 3 | GPL-3.0 | 9/5/2024, 5:15:29 PM (Europe/Amsterdam) |
38,406 | logcapture.py | phimpme_phimpme-generator/Phimpme/site-packages/nose/plugins/logcapture.py | """
This plugin captures logging statements issued during test execution. When an
error or failure occurs, the captured log messages are attached to the running
test in the test.capturedLogging attribute, and displayed with the error failure
output. It is enabled by default but can be turned off with the option
``--nol... | 9,307 | Python | .py | 216 | 33.777778 | 81 | 0.629483 | phimpme/phimpme-generator | 1,026 | 2 | 3 | GPL-3.0 | 9/5/2024, 5:15:29 PM (Europe/Amsterdam) |
38,407 | manager.py | phimpme_phimpme-generator/Phimpme/site-packages/nose/plugins/manager.py | """
Plugin Manager
--------------
A plugin manager class is used to load plugins, manage the list of
loaded plugins, and proxy calls to those plugins.
The plugin managers provided with nose are:
:class:`PluginManager`
This manager doesn't implement loadPlugins, so it can only work
with a static list of plugi... | 15,589 | Python | .py | 387 | 31.178295 | 87 | 0.624033 | phimpme/phimpme-generator | 1,026 | 2 | 3 | GPL-3.0 | 9/5/2024, 5:15:29 PM (Europe/Amsterdam) |
38,408 | __init__.py | phimpme_phimpme-generator/Phimpme/site-packages/nose/plugins/__init__.py | """
Writing Plugins
---------------
nose supports plugins for test collection, selection, observation and
reporting. There are two basic rules for plugins:
* Plugin classes should subclass :class:`nose.plugins.Plugin`.
* Plugins may implement any of the methods described in the class
:doc:`IPluginInterface <interf... | 6,291 | Python | .py | 134 | 43.216418 | 114 | 0.735453 | phimpme/phimpme-generator | 1,026 | 2 | 3 | GPL-3.0 | 9/5/2024, 5:15:29 PM (Europe/Amsterdam) |
38,409 | base.py | phimpme_phimpme-generator/Phimpme/site-packages/nose/plugins/base.py | import os
import textwrap
from optparse import OptionConflictError
from warnings import warn
from nose.util import tolist
class Plugin(object):
"""Base class for nose plugins. It's recommended but not *necessary* to
subclass this class to create a plugin, but all plugins *must* implement
`options(self, par... | 26,056 | Python | .py | 596 | 34.733221 | 80 | 0.642993 | phimpme/phimpme-generator | 1,026 | 2 | 3 | GPL-3.0 | 9/5/2024, 5:15:29 PM (Europe/Amsterdam) |
38,410 | debug.py | phimpme_phimpme-generator/Phimpme/site-packages/nose/plugins/debug.py | """
This plugin provides ``--pdb`` and ``--pdb-failures`` options. The ``--pdb``
option will drop the test runner into pdb when it encounters an error. To
drop into pdb on failure, use ``--pdb-failures``.
"""
import pdb
from nose.plugins.base import Plugin
class Pdb(Plugin):
"""
Provides --pdb and --pdb-failu... | 2,000 | Python | .py | 55 | 28.4 | 76 | 0.615822 | phimpme/phimpme-generator | 1,026 | 2 | 3 | GPL-3.0 | 9/5/2024, 5:15:29 PM (Europe/Amsterdam) |
38,411 | plugintest.py | phimpme_phimpme-generator/Phimpme/site-packages/nose/plugins/plugintest.py | """
Testing Plugins
===============
The plugin interface is well-tested enough to safely unit test your
use of its hooks with some level of confidence. However, there is also
a mixin for unittest.TestCase called PluginTester that's designed to
test plugins in their native runtime environment.
Here's a simple example ... | 13,558 | Python | .py | 355 | 31.197183 | 85 | 0.600061 | phimpme/phimpme-generator | 1,026 | 2 | 3 | GPL-3.0 | 9/5/2024, 5:15:29 PM (Europe/Amsterdam) |
38,412 | builtin.py | phimpme_phimpme-generator/Phimpme/site-packages/nose/plugins/builtin.py | """
Lists builtin plugins.
"""
plugins = []
builtins = (
('nose.plugins.attrib', 'AttributeSelector'),
('nose.plugins.capture', 'Capture'),
('nose.plugins.logcapture', 'LogCapture'),
('nose.plugins.cover', 'Coverage'),
('nose.plugins.debug', 'Pdb'),
('nose.plugins.deprecated', 'Deprecated'),
... | 1,021 | Python | .py | 32 | 27.21875 | 64 | 0.636272 | phimpme/phimpme-generator | 1,026 | 2 | 3 | GPL-3.0 | 9/5/2024, 5:15:29 PM (Europe/Amsterdam) |
38,413 | prof.py | phimpme_phimpme-generator/Phimpme/site-packages/nose/plugins/prof.py | """This plugin will run tests using the hotshot profiler, which is part
of the standard library. To turn it on, use the ``--with-profile`` option
or set the NOSE_WITH_PROFILE environment variable. Profiler output can be
controlled with the ``--profile-sort`` and ``--profile-restrict`` options,
and the profiler output f... | 5,357 | Python | .py | 141 | 27.262411 | 80 | 0.575629 | phimpme/phimpme-generator | 1,026 | 2 | 3 | GPL-3.0 | 9/5/2024, 5:15:29 PM (Europe/Amsterdam) |
38,414 | capture.py | phimpme_phimpme-generator/Phimpme/site-packages/nose/plugins/capture.py | """
This plugin captures stdout during test execution. If the test fails
or raises an error, the captured output will be appended to the error
or failure output. It is enabled by default but can be disabled with
the options ``-s`` or ``--nocapture``.
:Options:
``--nocapture``
Don't capture stdout (any stdout out... | 4,009 | Python | .py | 112 | 26.741071 | 72 | 0.573234 | phimpme/phimpme-generator | 1,026 | 2 | 3 | GPL-3.0 | 9/5/2024, 5:15:29 PM (Europe/Amsterdam) |
38,415 | multiprocess.py | phimpme_phimpme-generator/Phimpme/site-packages/nose/plugins/multiprocess.py | """
Overview
========
The multiprocess plugin enables you to distribute your test run among a set of
worker processes that run tests in parallel. This can speed up CPU-bound test
runs (as long as the number of work processeses is around the number of
processors or cores available), but is mainly useful for IO-bound te... | 35,281 | Python | .py | 756 | 33.215608 | 133 | 0.573802 | phimpme/phimpme-generator | 1,026 | 2 | 3 | GPL-3.0 | 9/5/2024, 5:15:29 PM (Europe/Amsterdam) |
38,416 | xunit.py | phimpme_phimpme-generator/Phimpme/site-packages/nose/plugins/xunit.py | """This plugin provides test results in the standard XUnit XML format.
It's designed for the `Jenkins`_ (previously Hudson) continuous build
system, but will probably work for anything else that understands an
XUnit-formatted XML representation of test results.
Add this shell command to your builder ::
nosetests... | 11,357 | Python | .py | 284 | 30.538732 | 80 | 0.577778 | phimpme/phimpme-generator | 1,026 | 2 | 3 | GPL-3.0 | 9/5/2024, 5:15:29 PM (Europe/Amsterdam) |
38,417 | .pydevproject | phimpme_phimpme-generator/Phimpme/.pydevproject | <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?eclipse-pydev version="1.0"?><pydev_project>
<pydev_variables_property name="org.python.pydev.PROJECT_VARIABLE_SUBSTITUTION">
<key>DJANGO_MANAGE_LOCATION</key>
<value>manage.py</value>
</pydev_variables_property>
<pydev_pathproperty name="org.python.pydev.PROJECT... | 591 | Python | .pyde | 12 | 48.25 | 91 | 0.780656 | phimpme/phimpme-generator | 1,026 | 2 | 3 | GPL-3.0 | 9/5/2024, 5:15:29 PM (Europe/Amsterdam) |
38,418 | setup.py | qutebrowser_qutebrowser/setup.py | #!/usr/bin/env python3
# SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""setuptools installer script for qutebrowser."""
import re
import ast
import os
import os.path
from scripts import setupcommon as common
import setuptools
try:
... | 3,230 | Python | .py | 81 | 31.530864 | 80 | 0.605809 | qutebrowser/qutebrowser | 9,586 | 1,006 | 1,208 | GPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
38,419 | .pylintrc | qutebrowser_qutebrowser/.pylintrc | [MASTER]
ignore=resources.py
extension-pkg-whitelist=PyQt5,PyQt6,sip
load-plugins=qute_pylint.config,
pylint.extensions.docstyle,
pylint.extensions.overlapping_exceptions,
pylint.extensions.code_style,
pylint.extensions.comparison_placement,
pylint.extens... | 2,746 | Python | .py | 88 | 24.784091 | 96 | 0.660249 | qutebrowser/qutebrowser | 9,586 | 1,006 | 1,208 | GPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
38,420 | .mypy.ini | qutebrowser_qutebrowser/.mypy.ini | [mypy]
python_version = 3.9
### --strict
warn_unused_configs = True
disallow_any_generics = True
disallow_subclassing_any = True
# disallow_untyped_calls = True
disallow_untyped_defs = True
disallow_incomplete_defs = True
check_untyped_defs = True
disallow_untyped_decorators = True
warn_redundant_casts = True
warn_unu... | 6,467 | Python | .py | 188 | 32.952128 | 56 | 0.840194 | qutebrowser/qutebrowser | 9,586 | 1,006 | 1,208 | GPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
38,421 | qutebrowser.py | qutebrowser_qutebrowser/qutebrowser.py | #!/usr/bin/env python3
# SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Simple launcher for qutebrowser."""
import sys
import qutebrowser.qutebrowser
if __name__ == '__main__':
sys.exit(qutebrowser.qutebrowser.main())
| 307 | Python | .py | 9 | 32 | 78 | 0.753425 | qutebrowser/qutebrowser | 9,586 | 1,006 | 1,208 | GPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
38,422 | .pydocstylerc | qutebrowser_qutebrowser/.pydocstylerc | [pydocstyle]
# Disabled checks:
# D102: Missing docstring in public method (will be handled by others)
# D103: Missing docstring in public function (will be handled by others)
# D104: Missing docstring in public package (will be handled by others)
# D105: Missing docstring in magic method (will be handled by others)
# ... | 665 | Python | .py | 13 | 50.153846 | 72 | 0.763804 | qutebrowser/qutebrowser | 9,586 | 1,006 | 1,208 | GPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
38,423 | conftest.py | qutebrowser_qutebrowser/tests/conftest.py | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""The qutebrowser test suite conftest file."""
import os
import pathlib
import sys
import ssl
import pytest
import hypothesis
import hypothesis.database
pytest.register_assert_rewrite('helpe... | 12,569 | Python | .py | 321 | 32.046729 | 118 | 0.664147 | qutebrowser/qutebrowser | 9,586 | 1,006 | 1,208 | GPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
38,424 | test_conftest.py | qutebrowser_qutebrowser/tests/test_conftest.py | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Various meta-tests for conftest.py."""
import os
import sys
import warnings
import pytest
import qutebrowser
def test_qapp_name(qapp):
"""Make sure the QApplication name is changed ... | 974 | Python | .py | 24 | 36.583333 | 83 | 0.73746 | qutebrowser/qutebrowser | 9,586 | 1,006 | 1,208 | GPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
38,425 | test_app.py | qutebrowser_qutebrowser/tests/unit/test_app.py | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests for the qutebrowser.app module."""
from qutebrowser.qt.core import QBuffer
from qutebrowser.misc import objects
from qutebrowser import app
def test_on_focus_changed_issue1484(monke... | 781 | Python | .py | 17 | 42.352941 | 78 | 0.751323 | qutebrowser/qutebrowser | 9,586 | 1,006 | 1,208 | GPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
38,426 | test_qutebrowser.py | qutebrowser_qutebrowser/tests/unit/test_qutebrowser.py | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests for qutebrowser.qutebrowser.
(Mainly commandline flag parsing)
"""
import re
import pytest
from qutebrowser import qutebrowser
@pytest.fixture
def parser():
return qutebrowser... | 3,574 | Python | .py | 97 | 27.690722 | 87 | 0.558806 | qutebrowser/qutebrowser | 9,586 | 1,006 | 1,208 | GPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
38,427 | test_qt_machinery.py | qutebrowser_qutebrowser/tests/unit/test_qt_machinery.py | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Test qutebrowser.qt.machinery."""
import re
import sys
import html
import argparse
import typing
from typing import Any, Optional, Union
import dataclasses
import pytest
from qutebrowser.q... | 15,945 | Python | .py | 442 | 25.468326 | 87 | 0.574018 | qutebrowser/qutebrowser | 9,586 | 1,006 | 1,208 | GPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
38,428 | test_loader.py | qutebrowser_qutebrowser/tests/unit/extensions/test_loader.py | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
import types
import pytest
from qutebrowser.extensions import loader
from qutebrowser.misc import objects
pytestmark = pytest.mark.usefixtures('data_tmpdir', 'config_tmpdir',
... | 3,276 | Python | .py | 81 | 34.790123 | 78 | 0.696259 | qutebrowser/qutebrowser | 9,586 | 1,006 | 1,208 | GPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
38,429 | conftest.py | qutebrowser_qutebrowser/tests/unit/javascript/conftest.py | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""pytest conftest file for javascript tests."""
import pathlib
import pytest
import jinja2
from qutebrowser.qt.core import QUrl
import qutebrowser
from qutebrowser.utils import usertypes
JS... | 4,494 | Python | .py | 102 | 34.627451 | 79 | 0.625716 | qutebrowser/qutebrowser | 9,586 | 1,006 | 1,208 | GPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
38,430 | test_greasemonkey.py | qutebrowser_qutebrowser/tests/unit/javascript/test_greasemonkey.py | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests for qutebrowser.browser.greasemonkey."""
import textwrap
import logging
import pathlib
import pytest
from qutebrowser.qt.core import QUrl
from qutebrowser.utils import usertypes, ve... | 18,856 | Python | .py | 481 | 32.548857 | 125 | 0.625308 | qutebrowser/qutebrowser | 9,586 | 1,006 | 1,208 | GPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
38,431 | test_js_execution.py | qutebrowser_qutebrowser/tests/unit/javascript/test_js_execution.py | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Check how Qt behaves when trying to execute JS."""
import pytest
@pytest.mark.parametrize('js_enabled, expected', [(True, 2.0), (False, None)])
def test_simple_js_webkit(webview, js_enabl... | 2,610 | Python | .py | 52 | 44.711538 | 92 | 0.720126 | qutebrowser/qutebrowser | 9,586 | 1,006 | 1,208 | GPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
38,432 | test_js_quirks.py | qutebrowser_qutebrowser/tests/unit/javascript/test_js_quirks.py | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests for QtWebEngine JavaScript quirks.
This tests JS functionality which is missing in older QtWebEngine releases, but we have
polyfills for. They should either pass because the polyfill i... | 2,491 | Python | .py | 64 | 33.71875 | 88 | 0.677713 | qutebrowser/qutebrowser | 9,586 | 1,006 | 1,208 | GPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
38,433 | test_position_caret.py | qutebrowser_qutebrowser/tests/unit/javascript/position_caret/test_position_caret.py | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests for position_caret.js."""
import pytest
QWebSettings = pytest.importorskip("qutebrowser.qt.webkit").QWebSettings
QWebPage = pytest.importorskip("qutebrowser.qt.webkitwidgets").QWebPag... | 3,056 | Python | .py | 70 | 38.842857 | 86 | 0.729666 | qutebrowser/qutebrowser | 9,586 | 1,006 | 1,208 | GPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
38,434 | test_stylesheet_js.py | qutebrowser_qutebrowser/tests/unit/javascript/stylesheet/test_stylesheet_js.py | # SPDX-FileCopyrightText: Jay Kamat <jaygkamat@gmail.com>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests for stylesheet.js."""
import pathlib
import pytest
QtWebEngineCore = pytest.importorskip("qutebrowser.qt.webenginecore")
QWebEngineProfile = QtWebEngineCore.QWebEngineProfile
from qutebrowser.utils impor... | 4,523 | Python | .py | 92 | 42.032609 | 77 | 0.677419 | qutebrowser/qutebrowser | 9,586 | 1,006 | 1,208 | GPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
38,435 | test_qtargs.py | qutebrowser_qutebrowser/tests/unit/config/test_qtargs.py | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
import sys
import os
import logging
import pytest
from qutebrowser.qt import machinery
from qutebrowser import qutebrowser
from qutebrowser.config import qtargs, configdata
from qutebrowser.u... | 24,245 | Python | .py | 555 | 33.942342 | 96 | 0.600704 | qutebrowser/qutebrowser | 9,586 | 1,006 | 1,208 | GPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
38,436 | test_configcache.py | qutebrowser_qutebrowser/tests/unit/config/test_configcache.py | # SPDX-FileCopyrightText: Jay Kamat <jaygkamat@gmail.com>
#
# SPDX-License-Identifier: GPL-3.0-or-later
# False-positives
# FIXME: Report this to pylint?
# pylint: disable=unsubscriptable-object,useless-suppression
"""Tests for qutebrowser.config.configcache."""
import pytest
from qutebrowser.config import config
... | 1,513 | Python | .py | 35 | 37.714286 | 74 | 0.726093 | qutebrowser/qutebrowser | 9,586 | 1,006 | 1,208 | GPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
38,437 | test_configutils.py | qutebrowser_qutebrowser/tests/unit/config/test_configutils.py | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
import hypothesis
from hypothesis import strategies
import pytest
from qutebrowser.qt.core import QUrl
from qutebrowser.qt.widgets import QLabel
from qutebrowser.config import configutils, conf... | 12,087 | Python | .py | 266 | 38.796992 | 86 | 0.670394 | qutebrowser/qutebrowser | 9,586 | 1,006 | 1,208 | GPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
38,438 | test_configfiles.py | qutebrowser_qutebrowser/tests/unit/config/test_configfiles.py | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests for qutebrowser.config.configfiles."""
import os
import sys
import unittest.mock
import textwrap
import logging
import pytest
from qutebrowser.qt.core import QSettings
from qutebrow... | 56,506 | Python | .py | 1,277 | 34.919342 | 94 | 0.60586 | qutebrowser/qutebrowser | 9,586 | 1,006 | 1,208 | GPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
38,439 | test_stylesheet.py | qutebrowser_qutebrowser/tests/unit/config/test_stylesheet.py | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
import pytest
from qutebrowser.qt.core import QObject
from qutebrowser.config import stylesheet
class StyleObj(QObject):
def __init__(self, stylesheet=None, parent=None):
super... | 1,974 | Python | .py | 43 | 38.883721 | 88 | 0.681129 | qutebrowser/qutebrowser | 9,586 | 1,006 | 1,208 | GPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
38,440 | test_configexc.py | qutebrowser_qutebrowser/tests/unit/config/test_configexc.py | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests for qutebrowser.config.configexc."""
import textwrap
import pytest
from qutebrowser.config import configexc
from qutebrowser.utils import usertypes
def test_validation_error():
... | 4,003 | Python | .py | 99 | 34.141414 | 83 | 0.648397 | qutebrowser/qutebrowser | 9,586 | 1,006 | 1,208 | GPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
38,441 | test_configinit.py | qutebrowser_qutebrowser/tests/unit/config/test_configinit.py | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests for qutebrowser.config.configinit."""
import builtins
import logging
import unittest.mock
import pytest
from qutebrowser.config import (config, configexc, configfiles, configinit,
... | 16,567 | Python | .py | 344 | 37.116279 | 88 | 0.599802 | qutebrowser/qutebrowser | 9,586 | 1,006 | 1,208 | GPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
38,442 | test_configcommands.py | qutebrowser_qutebrowser/tests/unit/config/test_configcommands.py | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests for qutebrowser.config.configcommands."""
import logging
import functools
import unittest.mock
import pytest
from qutebrowser.qt.core import QUrl
from qutebrowser.config import conf... | 34,904 | Python | .py | 724 | 38.120166 | 95 | 0.607744 | qutebrowser/qutebrowser | 9,586 | 1,006 | 1,208 | GPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
38,443 | test_configtypes.py | qutebrowser_qutebrowser/tests/unit/config/test_configtypes.py | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests for qutebrowser.config.configtypes."""
import re
import json
import math
import warnings
import inspect
import functools
import dataclasses
import pytest
import hypothesis
from hypot... | 73,568 | Python | .py | 1,759 | 33.135873 | 92 | 0.580688 | qutebrowser/qutebrowser | 9,586 | 1,006 | 1,208 | GPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
38,444 | test_websettings.py | qutebrowser_qutebrowser/tests/unit/config/test_websettings.py | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
import pytest
from qutebrowser.config import websettings
from qutebrowser.misc import objects
from qutebrowser.utils import usertypes
@pytest.mark.parametrize([ # noqa: PT006
'user_agent... | 3,232 | Python | .py | 78 | 34.282051 | 78 | 0.651607 | qutebrowser/qutebrowser | 9,586 | 1,006 | 1,208 | GPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
38,445 | test_config.py | qutebrowser_qutebrowser/tests/unit/config/test_config.py | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests for qutebrowser.config.config."""
import types
import unittest.mock
import functools
import pytest
from qutebrowser.qt.core import QUrl
from qutebrowser.qt.gui import QColor
from qu... | 31,855 | Python | .py | 678 | 36.175516 | 88 | 0.586875 | qutebrowser/qutebrowser | 9,586 | 1,006 | 1,208 | GPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
38,446 | test_qtargs_locale_workaround.py | qutebrowser_qutebrowser/tests/unit/config/test_qtargs_locale_workaround.py | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
import os
import pathlib
import pytest
from qutebrowser.qt.core import QLocale
from qutebrowser.utils import utils
from qutebrowser.config import qtargs
pytest.importorskip('qutebrowser.qt.... | 13,708 | Python | .py | 425 | 27.371765 | 79 | 0.491288 | qutebrowser/qutebrowser | 9,586 | 1,006 | 1,208 | GPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
38,447 | test_configdata.py | qutebrowser_qutebrowser/tests/unit/config/test_configdata.py | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests for qutebrowser.config.configdata."""
import textwrap
import yaml
import pytest
# To run cmdutils.register decorators
from qutebrowser import app # pylint: disable=unused-import
fr... | 10,356 | Python | .py | 260 | 29.480769 | 79 | 0.582131 | qutebrowser/qutebrowser | 9,586 | 1,006 | 1,208 | GPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
38,448 | conftest.py | qutebrowser_qutebrowser/tests/unit/keyinput/conftest.py | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>:
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""pytest fixtures for tests.keyinput."""
import pytest
import contextlib
from qutebrowser.keyinput import keyutils
BINDINGS = {'prompt': {'<Ctrl-a>': 'message-info ctrla',
... | 1,592 | Python | .py | 41 | 30.219512 | 79 | 0.596753 | qutebrowser/qutebrowser | 9,586 | 1,006 | 1,208 | GPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
38,449 | test_bindingtrie.py | qutebrowser_qutebrowser/tests/unit/keyinput/test_bindingtrie.py | # SPDX-FileCopyrightText: Jay Kamat <jaygkamat@gmail.com>:
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests for the BindingTrie."""
import string
import itertools
import textwrap
import pytest
from qutebrowser.qt.gui import QKeySequence
from qutebrowser.keyinput import basekeyparser
from qutebrowser.keyinput... | 3,629 | Python | .py | 96 | 29.302083 | 86 | 0.625 | qutebrowser/qutebrowser | 9,586 | 1,006 | 1,208 | GPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
38,450 | test_modeman.py | qutebrowser_qutebrowser/tests/unit/keyinput/test_modeman.py | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
import pytest
from qutebrowser.qt.core import Qt, QObject, pyqtSignal
from qutebrowser.qt.gui import QKeyEvent, QKeySequence
from qutebrowser.utils import usertypes
from qutebrowser.keyinput i... | 1,739 | Python | .py | 41 | 38.02439 | 99 | 0.745692 | qutebrowser/qutebrowser | 9,586 | 1,006 | 1,208 | GPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
38,451 | test_keyutils.py | qutebrowser_qutebrowser/tests/unit/keyinput/test_keyutils.py | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
import operator
import hypothesis
from hypothesis import strategies
import pytest
from qutebrowser.qt import machinery
from qutebrowser.qt.core import Qt, QEvent, pyqtSignal
from qutebrowser.qt... | 26,312 | Python | .py | 539 | 41.415584 | 146 | 0.654575 | qutebrowser/qutebrowser | 9,586 | 1,006 | 1,208 | GPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
38,452 | test_basekeyparser.py | qutebrowser_qutebrowser/tests/unit/keyinput/test_basekeyparser.py | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>:
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests for BaseKeyParser."""
import logging
import re
import sys
from unittest import mock
from qutebrowser.qt.core import Qt
import pytest
from qutebrowser.keyinput import basekeyparser, ... | 14,627 | Python | .py | 287 | 42.135889 | 108 | 0.659888 | qutebrowser/qutebrowser | 9,586 | 1,006 | 1,208 | GPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
38,453 | test_modeparsers.py | qutebrowser_qutebrowser/tests/unit/keyinput/test_modeparsers.py | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>:
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests for mode parsers."""
from qutebrowser.qt.core import Qt
from qutebrowser.qt.gui import QKeySequence
import pytest
from qutebrowser.keyinput import modeparsers, keyutils
from qutebro... | 5,751 | Python | .py | 136 | 32.117647 | 99 | 0.615813 | qutebrowser/qutebrowser | 9,586 | 1,006 | 1,208 | GPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
38,454 | key_data.py | qutebrowser_qutebrowser/tests/unit/keyinput/key_data.py | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
# FIXME:v4 (lint): disable=line-too-long
"""Data used by test_keyutils.py to test all keys."""
import dataclasses
from typing import Optional
from qutebrowser.qt.core import Qt
from qutebrow... | 23,998 | Python | .py | 563 | 37.117229 | 137 | 0.594414 | qutebrowser/qutebrowser | 9,586 | 1,006 | 1,208 | GPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
38,455 | test_standarddir.py | qutebrowser_qutebrowser/tests/unit/utils/test_standarddir.py | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests for qutebrowser.utils.standarddir."""
import os
import os.path
import sys
import json
import types
import textwrap
import logging
import subprocess
from qutebrowser.qt.core import QSt... | 17,424 | Python | .py | 380 | 37.713158 | 93 | 0.647743 | qutebrowser/qutebrowser | 9,586 | 1,006 | 1,208 | GPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
38,456 | test_debug.py | qutebrowser_qutebrowser/tests/unit/utils/test_debug.py | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests for qutebrowser.utils.debug."""
import logging
import re
import time
import textwrap
import pytest
from qutebrowser.qt.core import pyqtSignal, Qt, QEvent, QObject, QTimer
from qutebro... | 9,542 | Python | .py | 210 | 37.7 | 189 | 0.640882 | qutebrowser/qutebrowser | 9,586 | 1,006 | 1,208 | GPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
38,457 | test_error.py | qutebrowser_qutebrowser/tests/unit/utils/test_error.py | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests for qutebrowser.utils.error."""
import logging
import pytest
from qutebrowser.qt.core import QTimer
from qutebrowser.qt.widgets import QMessageBox
from qutebrowser.utils import error... | 2,701 | Python | .py | 67 | 32.19403 | 78 | 0.606338 | qutebrowser/qutebrowser | 9,586 | 1,006 | 1,208 | GPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
38,458 | test_log.py | qutebrowser_qutebrowser/tests/unit/utils/test_log.py | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests for qutebrowser.utils.log."""
import logging
import argparse
import itertools
import sys
import warnings
import pytest
import _pytest.logging # pylint: disable=import-private-name
f... | 12,714 | Python | .py | 291 | 35.618557 | 80 | 0.640337 | qutebrowser/qutebrowser | 9,586 | 1,006 | 1,208 | GPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
38,459 | test_urlutils.py | qutebrowser_qutebrowser/tests/unit/utils/test_urlutils.py | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests for qutebrowser.utils.urlutils."""
import os.path
import logging
import dataclasses
import urllib.parse
from qutebrowser.qt.core import QUrl
from qutebrowser.qt.network import QNetwor... | 31,435 | Python | .py | 694 | 38.237752 | 168 | 0.635394 | qutebrowser/qutebrowser | 9,586 | 1,006 | 1,208 | GPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
38,460 | test_qtutils.py | qutebrowser_qutebrowser/tests/unit/utils/test_qtutils.py | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests for qutebrowser.utils.qtutils."""
import io
import os
import pathlib
import dataclasses
import unittest
import unittest.mock
import pytest
from qutebrowser.qt.core import (QDataStream... | 41,708 | Python | .py | 933 | 35.96463 | 118 | 0.634407 | qutebrowser/qutebrowser | 9,586 | 1,006 | 1,208 | GPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
38,461 | test_utils.py | qutebrowser_qutebrowser/tests/unit/utils/test_utils.py | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests for qutebrowser.utils.utils."""
import sys
import enum
import os
import io
import logging
import functools
import re
import shlex
import math
import operator
from qutebrowser.qt.core ... | 36,377 | Python | .py | 873 | 33.753723 | 83 | 0.610376 | qutebrowser/qutebrowser | 9,586 | 1,006 | 1,208 | GPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
38,462 | overflow_test_cases.py | qutebrowser_qutebrowser/tests/unit/utils/overflow_test_cases.py | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Provides test data for overflow checking.
Module attributes:
INT32_MIN: Minimum valid value for a signed int32.
INT32_MAX: Maximum valid value for a signed int32.
INT64_MIN: Mini... | 1,762 | Python | .py | 47 | 32.425532 | 78 | 0.644706 | qutebrowser/qutebrowser | 9,586 | 1,006 | 1,208 | GPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
38,463 | test_qtlog.py | qutebrowser_qutebrowser/tests/unit/utils/test_qtlog.py | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests for qutebrowser.utils.qtlog."""
import dataclasses
import logging
import pytest
from qutebrowser import qutebrowser
from qutebrowser.utils import qtlog
from qutebrowser.qt import co... | 1,958 | Python | .py | 50 | 32.2 | 81 | 0.660847 | qutebrowser/qutebrowser | 9,586 | 1,006 | 1,208 | GPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
38,464 | test_javascript.py | qutebrowser_qutebrowser/tests/unit/utils/test_javascript.py | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests for qutebrowser.utils.javascript."""
import dataclasses
import pytest
import hypothesis
import hypothesis.strategies
from qutebrowser.utils import javascript, usertypes
@dataclasse... | 3,787 | Python | .py | 92 | 34.336957 | 85 | 0.622991 | qutebrowser/qutebrowser | 9,586 | 1,006 | 1,208 | GPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
38,465 | test_jinja.py | qutebrowser_qutebrowser/tests/unit/utils/test_jinja.py | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests for qutebrowser.utils.jinja."""
import pathlib
import logging
import jinja2.exceptions
import pytest
from qutebrowser.qt.core import QUrl
from qutebrowser.utils import jinja
from qut... | 4,459 | Python | .py | 104 | 36.923077 | 79 | 0.654175 | qutebrowser/qutebrowser | 9,586 | 1,006 | 1,208 | GPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
38,466 | test_version.py | qutebrowser_qutebrowser/tests/unit/utils/test_version.py | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests for qutebrowser.utils.version."""
import io
import sys
import os
import pathlib
import subprocess
import contextlib
import logging
import textwrap
import datetime
import dataclasses
im... | 54,488 | Python | .py | 1,327 | 32.114544 | 121 | 0.6103 | qutebrowser/qutebrowser | 9,586 | 1,006 | 1,208 | GPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
38,467 | test_urlmatch.py | qutebrowser_qutebrowser/tests/unit/utils/test_urlmatch.py | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests for qutebrowser.utils.urlmatch.
The tests are mostly inspired by Chromium's:
https://cs.chromium.org/chromium/src/extensions/common/url_pattern_unittest.cc
Currently not tested:
- Nes... | 24,710 | Python | .py | 650 | 31.275385 | 111 | 0.607292 | qutebrowser/qutebrowser | 9,586 | 1,006 | 1,208 | GPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
38,468 | test_resources.py | qutebrowser_qutebrowser/tests/unit/utils/test_resources.py | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests for qutebrowser.utils.resources."""
import os.path
import zipfile
import pytest
from qutebrowser.utils import utils, resources
@pytest.mark.usefixtures('freezer')
class TestReadFile:... | 4,268 | Python | .py | 92 | 36.51087 | 87 | 0.621114 | qutebrowser/qutebrowser | 9,586 | 1,006 | 1,208 | GPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
38,469 | test_misc.py | qutebrowser_qutebrowser/tests/unit/utils/usertypes/test_misc.py | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
from qutebrowser.utils import usertypes
def test_unset_object_identity():
assert usertypes.Unset() is not usertypes.Unset()
assert usertypes.UNSET is usertypes.UNSET
def test_unset_o... | 380 | Python | .py | 9 | 39.333333 | 78 | 0.773224 | qutebrowser/qutebrowser | 9,586 | 1,006 | 1,208 | GPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
38,470 | test_neighborlist.py | qutebrowser_qutebrowser/tests/unit/utils/usertypes/test_neighborlist.py | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests for the NeighborList class."""
import pytest
from qutebrowser.utils import usertypes
class TestInit:
"""Just try to init some neighborlists."""
def test_empty(self):
... | 9,477 | Python | .py | 236 | 32.050847 | 78 | 0.631923 | qutebrowser/qutebrowser | 9,586 | 1,006 | 1,208 | GPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
38,471 | test_question.py | qutebrowser_qutebrowser/tests/unit/utils/usertypes/test_question.py | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests for usertypes.Question."""
import pytest
from qutebrowser.utils import usertypes
@pytest.fixture
def question():
return usertypes.Question()
def test_attributes(question):
... | 2,050 | Python | .py | 51 | 33.392157 | 78 | 0.669526 | qutebrowser/qutebrowser | 9,586 | 1,006 | 1,208 | GPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
38,472 | test_timer.py | qutebrowser_qutebrowser/tests/unit/utils/usertypes/test_timer.py | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests for Timer."""
import logging
import fnmatch
import pytest
from qutebrowser.qt.core import QObject
from qutebrowser.utils import usertypes
class Parent(QObject):
"""Class for t... | 3,541 | Python | .py | 96 | 31.239583 | 84 | 0.664321 | qutebrowser/qutebrowser | 9,586 | 1,006 | 1,208 | GPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
38,473 | test_listcategory.py | qutebrowser_qutebrowser/tests/unit/completion/test_listcategory.py | # SPDX-FileCopyrightText: Ryan Roden-Corrent (rcorre) <ryan@rcorre.net>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests for CompletionFilterModel."""
import logging
import pytest
from qutebrowser.completion.models import listcategory
@pytest.mark.parametrize('pattern, before, after, after_nosort', [
('... | 1,910 | Python | .py | 47 | 35.638298 | 76 | 0.56 | qutebrowser/qutebrowser | 9,586 | 1,006 | 1,208 | GPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
38,474 | test_completiondelegate.py | qutebrowser_qutebrowser/tests/unit/completion/test_completiondelegate.py | # SPDX-FileCopyrightText: Ryan Roden-Corrent (rcorre) <ryan@rcorre.net>
#
# SPDX-License-Identifier: GPL-3.0-or-later
from unittest import mock
import hypothesis
import hypothesis.strategies
import pytest
from qutebrowser.qt.core import Qt
from qutebrowser.qt.gui import QTextDocument, QColor
from qutebrowser.qt.widge... | 2,717 | Python | .py | 67 | 36.179104 | 83 | 0.664894 | qutebrowser/qutebrowser | 9,586 | 1,006 | 1,208 | GPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
38,475 | test_histcategory.py | qutebrowser_qutebrowser/tests/unit/completion/test_histcategory.py | # SPDX-FileCopyrightText: Ryan Roden-Corrent (rcorre) <ryan@rcorre.net>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Test the web history completion category."""
import datetime
import logging
import hypothesis
from hypothesis import strategies
import pytest
from qutebrowser.misc import sql
from qutebrowser.com... | 8,301 | Python | .py | 212 | 33.693396 | 81 | 0.583572 | qutebrowser/qutebrowser | 9,586 | 1,006 | 1,208 | GPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
38,476 | test_completer.py | qutebrowser_qutebrowser/tests/unit/completion/test_completer.py | # SPDX-FileCopyrightText: Ryan Roden-Corrent (rcorre) <ryan@rcorre.net>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests for the Completer Object."""
import unittest.mock
import pytest
from qutebrowser.qt.gui import QStandardItemModel
from qutebrowser.completion import completer, completionwidget
from qutebro... | 14,404 | Python | .py | 301 | 41.534884 | 79 | 0.623309 | qutebrowser/qutebrowser | 9,586 | 1,006 | 1,208 | GPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
38,477 | test_models.py | qutebrowser_qutebrowser/tests/unit/completion/test_models.py | # SPDX-FileCopyrightText: Ryan Roden-Corrent (rcorre) <ryan@rcorre.net>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests for completion models."""
import collections
import os
import pathlib
import random
import string
import time
from datetime import datetime
from unittest import mock
import hypothesis
import... | 51,791 | Python | .py | 1,301 | 30.663336 | 102 | 0.574012 | qutebrowser/qutebrowser | 9,586 | 1,006 | 1,208 | GPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
38,478 | test_completionwidget.py | qutebrowser_qutebrowser/tests/unit/completion/test_completionwidget.py | # SPDX-FileCopyrightText: Ryan Roden-Corrent (rcorre) <ryan@rcorre.net>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests for the CompletionView Object."""
from unittest import mock
import pytest
from qutebrowser.qt.core import QRect, QItemSelectionModel
from qutebrowser.completion import completionwidget
from... | 15,096 | Python | .py | 312 | 41.38141 | 84 | 0.628057 | qutebrowser/qutebrowser | 9,586 | 1,006 | 1,208 | GPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
38,479 | test_completionmodel.py | qutebrowser_qutebrowser/tests/unit/completion/test_completionmodel.py | # SPDX-FileCopyrightText: Ryan Roden-Corrent (rcorre) <ryan@rcorre.net>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests for CompletionModel."""
from unittest import mock
import hypothesis
from hypothesis import strategies
import pytest
from qutebrowser.qt.core import QModelIndex
from qutebrowser.completion.m... | 3,775 | Python | .py | 87 | 37.195402 | 80 | 0.683007 | qutebrowser/qutebrowser | 9,586 | 1,006 | 1,208 | GPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
38,480 | test_cmdutils.py | qutebrowser_qutebrowser/tests/unit/api/test_cmdutils.py | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests for qutebrowser.api.cmdutils."""
import sys
import logging
import types
import enum
import textwrap
import pytest
from qutebrowser.misc import objects
from qutebrowser.commands impor... | 17,408 | Python | .py | 416 | 31.841346 | 79 | 0.581088 | qutebrowser/qutebrowser | 9,586 | 1,006 | 1,208 | GPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
38,481 | test_autoupdate.py | qutebrowser_qutebrowser/tests/unit/misc/test_autoupdate.py | # SPDX-FileCopyrightText: Alexander Cogneau (acogneau) <alexander.cogneau@gmail.com>:
# SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests for qutebrowser.misc.autoupdate."""
import pytest
from qutebrowser.qt.core import QUrl
from quteb... | 2,316 | Python | .py | 56 | 35.107143 | 85 | 0.678731 | qutebrowser/qutebrowser | 9,586 | 1,006 | 1,208 | GPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
38,482 | test_cmdhistory.py | qutebrowser_qutebrowser/tests/unit/misc/test_cmdhistory.py | # SPDX-FileCopyrightText: Alexander Cogneau (acogneau) <alexander.cogneau@gmail.com>
# SPDX-FileCopyrightText: Florian Bruhin (The-Compiler) <me@the-compiler.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests for misc.cmdhistory.History."""
import unittest.mock
import pytest
from qutebrowser.misc import cm... | 4,503 | Python | .py | 117 | 33 | 84 | 0.675433 | qutebrowser/qutebrowser | 9,586 | 1,006 | 1,208 | GPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
38,483 | test_lineparser.py | qutebrowser_qutebrowser/tests/unit/misc/test_lineparser.py | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests for qutebrowser.misc.lineparser."""
import pathlib
from unittest import mock
import pytest
from qutebrowser.misc import lineparser as lineparsermod
class TestBaseLineParser:
C... | 3,637 | Python | .py | 80 | 36.0625 | 79 | 0.614775 | qutebrowser/qutebrowser | 9,586 | 1,006 | 1,208 | GPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
38,484 | test_pakjoy.py | qutebrowser_qutebrowser/tests/unit/misc/test_pakjoy.py | # SPDX-FileCopyrightText: Florian Bruhin (The-Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
import os
import io
import json
import struct
import pathlib
import logging
import shutil
import pytest
from qutebrowser.misc import pakjoy, binparsing
from qutebrowser.utils import utils, ver... | 17,049 | Python | .py | 385 | 36.335065 | 232 | 0.665158 | qutebrowser/qutebrowser | 9,586 | 1,006 | 1,208 | GPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
38,485 | test_earlyinit.py | qutebrowser_qutebrowser/tests/unit/misc/test_earlyinit.py | # SPDX-FileCopyrightText: Florian Bruhin (The-Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Test qutebrowser.misc.earlyinit."""
import sys
import pytest
from qutebrowser.misc import earlyinit
@pytest.mark.parametrize('attr', ['stderr', '__stderr__'])
def test_init_faulthandler_... | 988 | Python | .py | 25 | 35.4 | 83 | 0.701994 | qutebrowser/qutebrowser | 9,586 | 1,006 | 1,208 | GPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
38,486 | test_guiprocess.py | qutebrowser_qutebrowser/tests/unit/misc/test_guiprocess.py | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests for qutebrowser.misc.guiprocess."""
import sys
import logging
import signal
import pytest
from qutebrowser.qt.core import QProcess, QUrl, Qt
from qutebrowser.misc import guiprocess
f... | 18,051 | Python | .py | 436 | 34.066514 | 90 | 0.649911 | qutebrowser/qutebrowser | 9,586 | 1,006 | 1,208 | GPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
38,487 | test_objects.py | qutebrowser_qutebrowser/tests/unit/misc/test_objects.py | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
import pytest
from qutebrowser.misc import objects
from qutebrowser.utils import usertypes
@pytest.mark.parametrize('func', [
lambda: objects.NoBackend() == usertypes.Backend.QtWebEngine,... | 565 | Python | .py | 14 | 37.357143 | 78 | 0.767824 | qutebrowser/qutebrowser | 9,586 | 1,006 | 1,208 | GPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
38,488 | test_checkpyver.py | qutebrowser_qutebrowser/tests/unit/misc/test_checkpyver.py | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests for qutebrowser.misc.checkpyver."""
import re
import sys
import subprocess
import unittest.mock
import pytest
from qutebrowser.misc import checkpyver
TEXT = (r"At least Python 3.9 ... | 2,804 | Python | .py | 66 | 35.136364 | 79 | 0.669974 | qutebrowser/qutebrowser | 9,586 | 1,006 | 1,208 | GPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
38,489 | test_split.py | qutebrowser_qutebrowser/tests/unit/misc/test_split.py | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests for qutebrowser.misc.split."""
import dataclasses
import pytest
from qutebrowser.misc import split
# Most tests copied from Python's shlex.
# The original test data set was from sh... | 6,326 | Python | .py | 150 | 37.466667 | 104 | 0.591324 | qutebrowser/qutebrowser | 9,586 | 1,006 | 1,208 | GPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
38,490 | test_keyhints.py | qutebrowser_qutebrowser/tests/unit/misc/test_keyhints.py | # SPDX-FileCopyrightText: Ryan Roden-Corrent (rcorre) <ryan@rcorre.net>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Test the keyhint widget."""
import pytest
from qutebrowser.utils import usertypes
from qutebrowser.misc import objects
from qutebrowser.misc.keyhintwidget import KeyHintView
def expected_text(*a... | 7,118 | Python | .py | 165 | 36.660606 | 77 | 0.631906 | qutebrowser/qutebrowser | 9,586 | 1,006 | 1,208 | GPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
38,491 | test_ipc.py | qutebrowser_qutebrowser/tests/unit/misc/test_ipc.py | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests for qutebrowser.misc.ipc."""
import os
import pathlib
import getpass
import logging
import json
import hashlib
import dataclasses
from unittest import mock
from typing import Optional
... | 29,386 | Python | .py | 642 | 37.082555 | 94 | 0.652535 | qutebrowser/qutebrowser | 9,586 | 1,006 | 1,208 | GPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
38,492 | test_crashdialog.py | qutebrowser_qutebrowser/tests/unit/misc/test_crashdialog.py | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests for qutebrowser.misc.crashdialog."""
import os
import pytest
from qutebrowser.misc import crashdialog
VALID_CRASH_TEXT = """
Fatal Python error: Segmentation fault
_
Current thread 0... | 2,403 | Python | .py | 69 | 31.594203 | 79 | 0.671404 | qutebrowser/qutebrowser | 9,586 | 1,006 | 1,208 | GPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
38,493 | test_throttle.py | qutebrowser_qutebrowser/tests/unit/misc/test_throttle.py | # SPDX-FileCopyrightText: Jay Kamat <jaygkamat@gmail.com>:
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests for qutebrowser.misc.throttle."""
from unittest import mock
from qutebrowser.qt import sip
import pytest
from qutebrowser.qt.core import QObject
from helpers import testutils
from qutebrowser.misc impor... | 2,923 | Python | .py | 100 | 24.57 | 62 | 0.684912 | qutebrowser/qutebrowser | 9,586 | 1,006 | 1,208 | GPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
38,494 | test_crashsignal.py | qutebrowser_qutebrowser/tests/unit/misc/test_crashsignal.py | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests for qutebrowser.misc.crashsignal."""
import signal
import pytest
from qutebrowser.config import configexc
from qutebrowser.qt.widgets import QApplication
from qutebrowser.misc import... | 2,986 | Python | .py | 77 | 33.168831 | 81 | 0.723109 | qutebrowser/qutebrowser | 9,586 | 1,006 | 1,208 | GPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
38,495 | test_utilcmds.py | qutebrowser_qutebrowser/tests/unit/misc/test_utilcmds.py | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests for qutebrowser.misc.utilcmds."""
import pytest
from qutebrowser.qt.core import QUrl
from qutebrowser.misc import utilcmds
from qutebrowser.api import cmdutils
from qutebrowser.utils ... | 2,019 | Python | .py | 47 | 38.042553 | 79 | 0.721228 | qutebrowser/qutebrowser | 9,586 | 1,006 | 1,208 | GPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
38,496 | test_msgbox.py | qutebrowser_qutebrowser/tests/unit/misc/test_msgbox.py | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests for qutebrowser.misc.msgbox."""
import pytest
from qutebrowser.qt.core import Qt
from qutebrowser.qt.widgets import QMessageBox, QWidget
from qutebrowser.misc import msgbox
from qute... | 2,503 | Python | .py | 63 | 34.253968 | 83 | 0.696857 | qutebrowser/qutebrowser | 9,586 | 1,006 | 1,208 | GPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
38,497 | test_editor.py | qutebrowser_qutebrowser/tests/unit/misc/test_editor.py | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests for qutebrowser.misc.editor."""
import sys
import time
import pathlib
import os
import logging
import pytest
from qutebrowser.qt.core import QProcess
from qutebrowser.misc import edi... | 10,619 | Python | .py | 226 | 39.597345 | 79 | 0.667798 | qutebrowser/qutebrowser | 9,586 | 1,006 | 1,208 | GPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
38,498 | test_pastebin.py | qutebrowser_qutebrowser/tests/unit/misc/test_pastebin.py | # SPDX-FileCopyrightText: Anna Kobak (avk) <awerk@onet.eu>:
# SPDX-FileCopyrightText: Florian Bruhin (The-Compiler) <me@the-compiler.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
import pytest
from qutebrowser.qt.core import QUrl
from qutebrowser.misc import httpclient, pastebin
@pytest.fixture
def pbclient(st... | 3,015 | Python | .py | 88 | 28.693182 | 78 | 0.644895 | qutebrowser/qutebrowser | 9,586 | 1,006 | 1,208 | GPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |
38,499 | test_sessions.py | qutebrowser_qutebrowser/tests/unit/misc/test_sessions.py | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Tests for qutebrowser.misc.sessions."""
import logging
import pytest
import yaml
from qutebrowser.qt.core import QUrl, QPoint, QByteArray, QObject
QWebView = pytest.importorskip('qutebrowse... | 11,668 | Python | .py | 263 | 36.087452 | 78 | 0.639152 | qutebrowser/qutebrowser | 9,586 | 1,006 | 1,208 | GPL-3.0 | 9/5/2024, 5:15:38 PM (Europe/Amsterdam) |