instance_id stringlengths 12 28 | repo stringclasses 17
values | patch stringlengths 0 96.8k | test_patch stringlengths 0 9.7k | problem_statement stringlengths 95 284k | run_test stringlengths 44 591 | base_commit stringlengths 7 40 | test_file stringlengths 14 136 |
|---|---|---|---|---|---|---|---|
ansible__ansible-4 | ansible/ansible | diff --git a/lib/ansible/playbook/collectionsearch.py b/lib/ansible/playbook/collectionsearch.py
index 93b80a8665..994e2e13e4 100644
--- a/lib/ansible/playbook/collectionsearch.py
+++ b/lib/ansible/playbook/collectionsearch.py
@@ -7,6 +7,10 @@ __metaclass__ = type
from ansible.module_utils.six import string_types
fro... | ============================= test session starts ==============================
platform linux -- Python 3.6.9, pytest-3.10.1, py-1.11.0, pluggy-0.13.1
rootdir: /home/user/BugsInPy/temp/projects/ansible, inifile:
plugins: mock-1.2
collected 1 item
test/units/playbook/test_collectionsearch.py F ... | pytest test/units/playbook/test_collectionsearch.py::test_collection_static_warning | d91658ec0c8434c82c3ef98bfe9eb4e1027a43a3 | test/units/playbook/test_collectionsearch.py | |
ansible__ansible-13 | ansible/ansible | diff --git a/lib/ansible/cli/galaxy.py b/lib/ansible/cli/galaxy.py
index 487f21d0db..9cf3a8e87e 100644
--- a/lib/ansible/cli/galaxy.py
+++ b/lib/ansible/cli/galaxy.py
@@ -29,12 +29,14 @@ from ansible.galaxy.role import GalaxyRole
from ansible.galaxy.token import BasicAuthToken, GalaxyToken, KeycloakToken, NoTokenSenti... | diff --git a/test/units/cli/test_galaxy.py b/test/units/cli/test_galaxy.py
index bc6628d2b3..f8b544e09f 100644
--- a/test/units/cli/test_galaxy.py
+++ b/test/units/cli/test_galaxy.py
@@ -890,6 +890,29 @@ def test_collection_install_in_collection_dir(collection_install, monkeypatch):
assert mock_install.call_args[0... | ============================= test session starts ==============================
platform linux -- Python 3.6.9, pytest-3.10.1, py-1.11.0, pluggy-0.13.1
rootdir: /home/user/BugsInPy/temp/projects/ansible, inifile:
collected 1 item
test/units/cli/test_galaxy.py F [100%]
=======... | pytest test/units/cli/test_galaxy.py::test_collection_install_with_url | 41472ee3878be215af8b933b2b04b4a72b9165ca | test/units/cli/test_galaxy.py |
ansible__ansible-9 | ansible/ansible | diff --git a/lib/ansible/modules/packaging/os/redhat_subscription.py b/lib/ansible/modules/packaging/os/redhat_subscription.py
index bc0bcc3ee7..d3cca7beb0 100644
--- a/lib/ansible/modules/packaging/os/redhat_subscription.py
+++ b/lib/ansible/modules/packaging/os/redhat_subscription.py
@@ -515,7 +515,9 @@ class Rhsm(Re... | diff --git a/test/units/modules/packaging/os/test_redhat_subscription.py b/test/units/modules/packaging/os/test_redhat_subscription.py
index 50c714b1e7..b2a11894fa 100644
--- a/test/units/modules/packaging/os/test_redhat_subscription.py
+++ b/test/units/modules/packaging/os/test_redhat_subscription.py
@@ -557,8 +557,7 ... | ============================= test session starts ==============================
platform linux -- Python 3.6.9, pytest-3.10.1, py-1.11.0, pluggy-0.13.1
rootdir: /home/user/BugsInPy/temp/projects/ansible, inifile:
plugins: mock-1.2
collected 13 items
test/units/modules/packaging/os/test_redhat_subscription.py ........... | pytest test/units/modules/packaging/os/test_redhat_subscription.py::test_redhat_subscribtion | 9276dd2007a73172ed99ab5a56cded4298d3cd2b | test/units/modules/packaging/os/test_redhat_subscription.py |
ansible__ansible-7 | ansible/ansible | diff --git a/lib/ansible/module_utils/network/eos/config/vlans/vlans.py b/lib/ansible/module_utils/network/eos/config/vlans/vlans.py
index 99cb37cd07..c2a701637d 100644
--- a/lib/ansible/module_utils/network/eos/config/vlans/vlans.py
+++ b/lib/ansible/module_utils/network/eos/config/vlans/vlans.py
@@ -208,16 +208,17 @@... | diff --git a/test/units/modules/network/eos/test_eos_vlans.py b/test/units/modules/network/eos/test_eos_vlans.py
index 5bdc878305..63f4d38d14 100644
--- a/test/units/modules/network/eos/test_eos_vlans.py
+++ b/test/units/modules/network/eos/test_eos_vlans.py
@@ -102,12 +102,12 @@ class TestEosVlansModule(TestEosModule)... | ============================= test session starts ==============================
platform linux -- Python 3.6.9, pytest-3.10.1, py-1.11.0, pluggy-0.13.1
rootdir: /home/user/BugsInPy/temp/projects/ansible, inifile:
collected 1 item
test/units/modules/network/eos/test_eos_vlans.py F [100%]
=======... | pytest test/units/modules/network/eos/test_eos_vlans.py::TestEosVlansModule::test_eos_vlan_replaced | cd146b836e032df785ecd9eb711c6ef23c2228b8 | test/units/modules/network/eos/test_eos_vlans.py |
ansible__ansible-12 | ansible/ansible | diff --git a/lib/ansible/plugins/lookup/env.py b/lib/ansible/plugins/lookup/env.py
index 6892feb8c5..5926bfeea4 100644
--- a/lib/ansible/plugins/lookup/env.py
+++ b/lib/ansible/plugins/lookup/env.py
@@ -27,9 +27,8 @@ RETURN = """
- values from the environment variables.
type: list
"""
-import os
-
from an... | ============================= test session starts ==============================
platform linux -- Python 3.6.9, pytest-3.10.1, py-1.11.0, pluggy-0.13.1
rootdir: /home/user/BugsInPy/temp/projects/ansible, inifile:
collected 4 items
test/units/plugins/lookup/test_env.py FFFF [100%]
======... | pytest test/units/plugins/lookup/test_env.py | 05e2e1806162393d76542a75c2520c7d61c2d855 | test/units/plugins/lookup/test_env.py | |
ansible__ansible-6 | ansible/ansible | diff --git a/lib/ansible/galaxy/collection.py b/lib/ansible/galaxy/collection.py
index 24b13d97a1..4d7b327613 100644
--- a/lib/ansible/galaxy/collection.py
+++ b/lib/ansible/galaxy/collection.py
@@ -219,12 +219,15 @@ class CollectionRequirement:
requirement = req
op = operator.eq
- ... | diff --git a/test/units/galaxy/test_collection_install.py b/test/units/galaxy/test_collection_install.py
index 3efd833b18..fc437db681 100644
--- a/test/units/galaxy/test_collection_install.py
+++ b/test/units/galaxy/test_collection_install.py
@@ -165,13 +165,14 @@ def test_build_requirement_from_path(collection_artifac... | RUN EVERY COMMAND
0
============================= test session starts ==============================
platform linux -- Python 3.6.9, pytest-3.10.1, py-1.11.0, pluggy-0.13.1
rootdir: /home/user/BugsInPy/temp/projects/ansible, inifile:
collected 3 items
test/units/galaxy/test_collection_install.py .FF ... | pytest test/units/galaxy/test_collection_install.py::test_build_requirement_from_path_with_manifest
pytest test/units/galaxy/test_collection_install.py::test_build_requirement_from_path_no_version
pytest test/units/galaxy/test_collection_install.py::test_add_collection_requirement_to_unknown_installed_version | 90898132e456ee1993db99a1531379f1b98ee915 | test/units/galaxy/test_collection_install.py |
ansible__ansible-2 | ansible/ansible | diff --git a/lib/ansible/utils/version.py b/lib/ansible/utils/version.py
index 0dc6687ed9..d69723b473 100644
--- a/lib/ansible/utils/version.py
+++ b/lib/ansible/utils/version.py
@@ -72,14 +72,14 @@ class _Alpha:
raise ValueError
- def __gt__(self, other):
- return not self.__lt__(other)
-
d... | diff --git a/test/units/utils/test_version.py b/test/units/utils/test_version.py
index a46282876f..7d04c112c5 100644
--- a/test/units/utils/test_version.py
+++ b/test/units/utils/test_version.py
@@ -268,6 +268,31 @@ def test_alpha():
assert _Alpha('b') >= _Alpha('a')
assert _Alpha('b') >= _Alpha('b')
+ #... | 0
============================= test session starts ==============================
platform linux -- Python 3.6.9, pytest-3.10.1, py-1.11.0, pluggy-0.13.1
rootdir: /home/user/BugsInPy/temp/projects/ansible, inifile:
collected 1 item
test/units/utils/test_version.py F [100%]
===... | pytest test/units/utils/test_version.py::test_alpha
pytest test/units/utils/test_version.py::test_numeric | de59b17c7f69d5cfb72479b71776cc8b97e29a6b | test/units/utils/test_version.py |
ansible__ansible-3 | ansible/ansible | diff --git a/lib/ansible/module_utils/facts/system/distribution.py b/lib/ansible/module_utils/facts/system/distribution.py
index 606dbc19bd..528b0e2b9e 100644
--- a/lib/ansible/module_utils/facts/system/distribution.py
+++ b/lib/ansible/module_utils/facts/system/distribution.py
@@ -320,7 +320,8 @@ class DistributionFil... | diff --git a/test/units/module_utils/test_distribution_version.py b/test/units/module_utils/test_distribution_version.py
index c92e3a4024..c709b76a53 100644
--- a/test/units/module_utils/test_distribution_version.py
+++ b/test/units/module_utils/test_distribution_version.py
@@ -990,6 +990,40 @@ TESTSETS = [
... | ============================= test session starts ==============================
platform linux -- Python 3.6.9, pytest-3.10.1, py-1.11.0, pluggy-0.13.1
rootdir: /home/user/BugsInPy/temp/projects/ansible, inifile:
plugins: mock-1.2
collected 54 items
test/units/module_utils/test_distribution_version.py .................. | pytest test/units/module_utils/test_distribution_version.py::test_distribution_version | 70219df9056ffb1e2766f572fbe71f7a1800c9f5 | test/units/module_utils/test_distribution_version.py |
ansible__ansible-10 | ansible/ansible | diff --git a/lib/ansible/modules/system/pamd.py b/lib/ansible/modules/system/pamd.py
index 0d8e32b5ae..50da1fcf9e 100644
--- a/lib/ansible/modules/system/pamd.py
+++ b/lib/ansible/modules/system/pamd.py
@@ -351,6 +351,8 @@ class PamdRule(PamdLine):
valid_control_actions = ['ignore', 'bad', 'die', 'ok', 'done', 're... | diff --git a/test/units/modules/system/test_pamd.py b/test/units/modules/system/test_pamd.py
index 35d4cb1c3a..93c1d08ad4 100644
--- a/test/units/modules/system/test_pamd.py
+++ b/test/units/modules/system/test_pamd.py
@@ -134,6 +134,12 @@ session required pam_unix.so"""
auth required pam_env.so
"""
... | 0
============================= test session starts ==============================
platform linux -- Python 3.6.9, pytest-3.10.1, py-1.11.0, pluggy-0.13.1
rootdir: /home/user/BugsInPy/temp/projects/ansible, inifile:
collected 1 item
test/units/modules/system/test_pamd.py F [100%]
===... | pytest test/units/modules/system/test_pamd.py::PamdServiceTestCase::test_remove_first_rule
pytest test/units/modules/system/test_pamd.py::PamdServiceTestCase::test_remove_last_rule | e368f788f71c338cd3f049d5d6bdc643a51c0514 | test/units/modules/system/test_pamd.py |
ansible__ansible-8 | ansible/ansible | diff --git a/lib/ansible/plugins/shell/powershell.py b/lib/ansible/plugins/shell/powershell.py
index ee23147cc5..ca2d5ebf5b 100644
--- a/lib/ansible/plugins/shell/powershell.py
+++ b/lib/ansible/plugins/shell/powershell.py
@@ -22,6 +22,7 @@ import re
import shlex
import pkgutil
import xml.etree.ElementTree as ET
+im... | diff --git a/test/units/plugins/shell/test_powershell.py b/test/units/plugins/shell/test_powershell.py
index a73070c689..6da7ffd5e6 100644
--- a/test/units/plugins/shell/test_powershell.py
+++ b/test/units/plugins/shell/test_powershell.py
@@ -1,4 +1,4 @@
-from ansible.plugins.shell.powershell import _parse_clixml
+from... | ============================= test session starts ==============================
platform linux -- Python 3.6.9, pytest-3.10.1, py-1.11.0, pluggy-0.13.1
rootdir: /home/user/BugsInPy/temp/projects/ansible, inifile:
collected 1 item
test/units/plugins/shell/test_powershell.py F [100%]
=======... | pytest test/units/plugins/shell/test_powershell.py::test_join_path_unc | 81378b3e744cd0d13b33d18a4f8a38aeb8a6e97a | test/units/plugins/shell/test_powershell.py |
ansible__ansible-17 | ansible/ansible | diff --git a/lib/ansible/module_utils/facts/hardware/linux.py b/lib/ansible/module_utils/facts/hardware/linux.py
index 19ca6e4799..befc2fb5e7 100644
--- a/lib/ansible/module_utils/facts/hardware/linux.py
+++ b/lib/ansible/module_utils/facts/hardware/linux.py
@@ -79,6 +79,9 @@ class LinuxHardware(Hardware):
# regex... | diff --git a/test/units/module_utils/facts/test_facts.py b/test/units/module_utils/facts/test_facts.py
index a037ee0ce3..ae1678341c 100644
--- a/test/units/module_utils/facts/test_facts.py
+++ b/test/units/module_utils/facts/test_facts.py
@@ -514,7 +514,11 @@ MTAB_ENTRIES = [
'0',
'0'
],
- ['f... | ============================= test session starts ==============================
platform linux -- Python 3.6.9, pytest-3.10.1, py-1.11.0, pluggy-0.13.1
rootdir: /home/user/BugsInPy/temp/projects/ansible, inifile:
plugins: mock-1.2
collected 1 item
test/units/module_utils/facts/test_facts.py F ... | pytest test/units/module_utils/facts/test_facts.py::TestFactsLinuxHardwareGetMountFacts::test_get_mount_facts | 9cb47832d15c61884b30d70f9d4e0f816b064b05 | test/units/module_utils/facts/test_facts.py |
ansible__ansible-15 | ansible/ansible | diff --git a/lib/ansible/modules/network/eos/eos_eapi.py b/lib/ansible/modules/network/eos/eos_eapi.py
index 07eeaf93eb..d3825a30df 100644
--- a/lib/ansible/modules/network/eos/eos_eapi.py
+++ b/lib/ansible/modules/network/eos/eos_eapi.py
@@ -264,7 +264,7 @@ def map_obj_to_commands(updates, module, warnings):
... | diff --git a/test/units/modules/network/eos/test_eos_eapi.py b/test/units/modules/network/eos/test_eos_eapi.py
index 3d80f19bd3..f002689e0c 100644
--- a/test/units/modules/network/eos/test_eos_eapi.py
+++ b/test/units/modules/network/eos/test_eos_eapi.py
@@ -134,7 +134,7 @@ class TestEosEapiModule(TestEosModule):
... | ============================= test session starts ==============================
platform linux -- Python 3.6.9, pytest-3.10.1, py-1.11.0, pluggy-0.13.1
rootdir: /home/user/BugsInPy/temp/projects/ansible, inifile:
collected 1 item
test/units/modules/network/eos/test_eos_eapi.py F [100%]
=======... | pytest test/units/modules/network/eos/test_eos_eapi.py::TestEosEapiModule::test_eos_eapi_vrf | b1e8a6c1cbd2a668b462995487b819ef7dd8ba4b | test/units/modules/network/eos/test_eos_eapi.py |
ansible__ansible-11 | ansible/ansible | diff --git a/lib/ansible/modules/network/ios/ios_banner.py b/lib/ansible/modules/network/ios/ios_banner.py
index be85781058..c28838407c 100644
--- a/lib/ansible/modules/network/ios/ios_banner.py
+++ b/lib/ansible/modules/network/ios/ios_banner.py
@@ -89,10 +89,9 @@ commands:
- string
"""
from ansible.module_util... | diff --git a/test/units/modules/network/ios/test_ios_banner.py b/test/units/modules/network/ios/test_ios_banner.py
index 4e7106e966..cdd43d8e79 100644
--- a/test/units/modules/network/ios/test_ios_banner.py
+++ b/test/units/modules/network/ios/test_ios_banner.py
@@ -30,20 +30,21 @@ class TestIosBannerModule(TestIosModu... | 0
============================= test session starts ==============================
platform linux -- Python 3.6.9, pytest-3.10.1, py-1.11.0, pluggy-0.13.1
rootdir: /home/user/BugsInPy/temp/projects/ansible, inifile:
plugins: mock-1.2
collected 1 item
test/units/modules/network/ios/test_ios_banner.py F ... | pytest test/units/modules/network/ios/test_ios_banner.py::TestIosBannerModule::test_ios_banner_nochange
pytest test/units/modules/network/ios/test_ios_banner.py::TestIosBannerIos12Module::test_ios_banner_nochange | da07b98b7a433493728ddb7ac7efbd20b8988776 | test/units/modules/network/ios/test_ios_banner.py |
ansible__ansible-18 | ansible/ansible | diff --git a/lib/ansible/cli/galaxy.py b/lib/ansible/cli/galaxy.py
index 4ff114ec70..66c45a723c 100644
--- a/lib/ansible/cli/galaxy.py
+++ b/lib/ansible/cli/galaxy.py
@@ -55,7 +55,7 @@ class GalaxyCLI(CLI):
''' create an options parser for bin/ansible '''
super(GalaxyCLI, self).init_parser(
- ... | diff --git a/test/units/cli/test_galaxy.py b/test/units/cli/test_galaxy.py
index c63dc3e21f..e9ba9b8ee8 100644
--- a/test/units/cli/test_galaxy.py
+++ b/test/units/cli/test_galaxy.py
@@ -494,7 +494,7 @@ def test_collection_default(collection_skeleton):
assert metadata['authors'] == ['your name <example@domain.com>... | ============================= test session starts ==============================
platform linux -- Python 3.6.9, pytest-3.10.1, py-1.11.0, pluggy-0.13.1
rootdir: /home/user/BugsInPy/temp/projects/ansible, inifile:
plugins: mock-1.2
collected 1 item
test/units/cli/test_galaxy.py F ... | pytest test/units/cli/test_galaxy.py::test_collection_default | bb1256ca9aa4c22225dbeef0ef23a20fa9388b2f | test/units/cli/test_galaxy.py |
ansible__ansible-14 | ansible/ansible | diff --git a/lib/ansible/galaxy/api.py b/lib/ansible/galaxy/api.py
index da53f2e70c..ed9be32af3 100644
--- a/lib/ansible/galaxy/api.py
+++ b/lib/ansible/galaxy/api.py
@@ -21,6 +21,12 @@ from ansible.module_utils.urls import open_url
from ansible.utils.display import Display
from ansible.utils.hashing import secure_ha... | diff --git a/test/units/galaxy/test_api.py b/test/units/galaxy/test_api.py
index 11fd435f0e..7464a7d7f4 100644
--- a/test/units/galaxy/test_api.py
+++ b/test/units/galaxy/test_api.py
@@ -860,3 +860,50 @@ def test_get_collection_versions_pagination(api_version, token_type, token_ins,
assert mock_open.mock_calls... | ============================= test session starts ==============================
platform linux -- Python 3.6.9, pytest-3.10.1, py-1.11.0, pluggy-0.13.1
rootdir: /home/user/BugsInPy/temp/projects/ansible, inifile:
collected 2 items
test/units/galaxy/test_api.py .F [100%]
======... | pytest test/units/galaxy/test_api.py::test_get_role_versions_pagination | a1ab093ddbd32f1002cbf6d6f184c7d0041d890d | test/units/galaxy/test_api.py |
ansible__ansible-5 | ansible/ansible | diff --git a/lib/ansible/module_utils/common/validation.py b/lib/ansible/module_utils/common/validation.py
index 4c29c8b234..fc13f4d0aa 100644
--- a/lib/ansible/module_utils/common/validation.py
+++ b/lib/ansible/module_utils/common/validation.py
@@ -189,7 +189,7 @@ def check_required_arguments(argument_spec, module_pa... | ============================= test session starts ==============================
platform linux -- Python 3.6.9, pytest-3.10.1, py-1.11.0, pluggy-0.13.1
rootdir: /home/user/BugsInPy/temp/projects/ansible, inifile:
collected 1 item
test/units/module_utils/common/validation/test_check_required_arguments.py F [100%]
===... | pytest test/units/module_utils/common/validation/test_check_required_arguments.py::test_check_required_arguments_missing_multiple | 2af76f16be8cf2239daaec4c2f31c3dcb4e3469e | test/units/module_utils/common/validation/test_check_required_arguments.py | |
ansible__ansible-16 | ansible/ansible | diff --git a/lib/ansible/module_utils/facts/hardware/linux.py b/lib/ansible/module_utils/facts/hardware/linux.py
index befc2fb5e7..503a6e3b73 100644
--- a/lib/ansible/module_utils/facts/hardware/linux.py
+++ b/lib/ansible/module_utils/facts/hardware/linux.py
@@ -242,8 +242,9 @@ class LinuxHardware(Hardware):
... | diff --git a/test/units/module_utils/facts/hardware/test_linux_get_cpu_info.py b/test/units/module_utils/facts/hardware/test_linux_get_cpu_info.py
index 542ed4bce2..cda251e4ea 100644
--- a/test/units/module_utils/facts/hardware/test_linux_get_cpu_info.py
+++ b/test/units/module_utils/facts/hardware/test_linux_get_cpu_i... | ============================= test session starts ==============================
platform linux -- Python 3.6.9, pytest-3.10.1, py-1.11.0, pluggy-0.13.1
rootdir: /home/user/BugsInPy/temp/projects/ansible, inifile:
plugins: mock-1.2
collected 1 item
test/units/module_utils/facts/hardware/test_linux_get_cpu_info.py F ... | pytest test/units/module_utils/facts/hardware/test_linux_get_cpu_info.py::test_get_cpu_info_missing_arch | 2a9964ede8b2b77a62a005f6f5abc964b2819b0e | test/units/module_utils/facts/hardware/test_linux_get_cpu_info.py |
ansible__ansible-1 | ansible/ansible | diff --git a/lib/ansible/galaxy/collection.py b/lib/ansible/galaxy/collection.py
index a055b08e71..856e54666f 100644
--- a/lib/ansible/galaxy/collection.py
+++ b/lib/ansible/galaxy/collection.py
@@ -668,6 +668,11 @@ def verify_collections(collections, search_paths, apis, validate_certs, ignore_e
fo... | diff --git a/test/units/galaxy/test_collection.py b/test/units/galaxy/test_collection.py
index f6b285cca0..1fced76933 100644
--- a/test/units/galaxy/test_collection.py
+++ b/test/units/galaxy/test_collection.py
@@ -1154,6 +1154,25 @@ def test_verify_identical(monkeypatch, mock_collection, manifest_info, files_man
... | ============================= test session starts ==============================
platform linux -- Python 3.6.9, pytest-3.10.1, py-1.11.0, pluggy-0.13.1
rootdir: /home/user/BugsInPy/temp/projects/ansible, inifile:
collected 1 item
test/units/galaxy/test_collection.py F [100%]
=======... | pytest test/units/galaxy/test_collection.py::test_verify_collections_no_version | 25c5388fdec9e56517a93feb5e8d485680946c25 | test/units/galaxy/test_collection.py |
psf__black-19 | psf/black | diff --git a/black.py b/black.py
index 15a7547..a03b9aa 100644
--- a/black.py
+++ b/black.py
@@ -1044,6 +1044,10 @@ class EmptyLineTracker:
# Don't insert empty lines between decorators.
return 0, 0
+ if is_decorator and self.previous_line and self.previous_line.is_comment... | diff --git a/tests/test_black.py b/tests/test_black.py
index dd3beed..9c029df 100644
--- a/tests/test_black.py
+++ b/tests/test_black.py
@@ -626,6 +626,14 @@ class BlackTestCase(unittest.TestCase):
)
self.assertEqual(result.exit_code, 1)
+ @patch("black.dump_to_file", dump_to_stderr)
+ ... | Expected tree:
file_input
decorated
decorators
decorator
AT '@'
NAME 'property'
NEWLINE '\n'
/decorator
decorator
AT '# TODO: X\n' '@'
NAME 'property'
NEWLINE '\n'
/decorator
decorator
AT '# TODO: Y\n# TODO: Z\n' '@'
NAM... | python -m unittest -q tests.test_black.BlackTestCase.test_comment_in_decorator | 337a4199f90ca48a19cf26511e0cec330b13bd4e | tests/comments6.py;tests/test_black.py |
psf__black-4 | psf/black | diff --git a/black.py b/black.py
index f7022d8..05edf1a 100644
--- a/black.py
+++ b/black.py
@@ -1480,7 +1480,13 @@ class EmptyLineTracker:
lines (two on module-level).
"""
before, after = self._maybe_empty_lines(current_line)
- before -= self.previous_after
+ before = (
+ ... | diff --git a/tests/test_black.py b/tests/test_black.py
index 7b3a8b6..015243f 100644
--- a/tests/test_black.py
+++ b/tests/test_black.py
@@ -639,6 +639,14 @@ class BlackTestCase(unittest.TestCase):
black.assert_equivalent(source, actual)
black.assert_stable(source, actual, black.FileMode())
+ @pa... | Expected tree:
file_input
simple_stmt
power
NAME 'print'
trailer
LPAR '('
STRING '"hello, world"'
RPAR ')'
/trailer
/power
NEWLINE '\n'
/simple_stmt
ENDMARKER ''
/file_input
Actual tree:
file_input
simple_stmt
power
NAME '\n\n' 'print'
traile... | python -m unittest -q tests.test_black.BlackTestCase.test_beginning_backslash | 65ea568e3301951f26e0e3b98f6d5dc80132e917 | tests/test_black.py;tests/data/beginning_backslash.py |
psf__black-13 | psf/black | diff --git a/blib2to3/pgen2/tokenize.py b/blib2to3/pgen2/tokenize.py
index 9a7664b..1f51ff0 100644
--- a/blib2to3/pgen2/tokenize.py
+++ b/blib2to3/pgen2/tokenize.py
@@ -516,13 +516,14 @@ def generate_tokens(readline):
stashed = tok
continue
- if tok... | diff --git a/tests/test_black.py b/tests/test_black.py
index 10d7f28..9c798ca 100644
--- a/tests/test_black.py
+++ b/tests/test_black.py
@@ -411,6 +411,16 @@ class BlackTestCase(unittest.TestCase):
self.assertFormatEqual(expected, actual)
black.assert_stable(source, actual, line_length=ll, mode=mode)
... | ======================================================================
ERROR: test_python37 (tests.test_black.BlackTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/opt/conda/envs/f55af976068fc1252014f3b7e1dbdb4f/lib/python3.8/unittest/mock.py",... | python -m unittest -q tests.test_black.BlackTestCase.test_python37 | b719d85ccc330170e40b2617307a7e3b2a0bab14 | tests/data/python37.py;tests/test_black.py |
psf__black-22 | psf/black | diff --git a/black.py b/black.py
index dab3f00..6499b22 100644
--- a/black.py
+++ b/black.py
@@ -3,14 +3,25 @@
import asyncio
from asyncio.base_events import BaseEventLoop
from concurrent.futures import Executor, ProcessPoolExecutor
-from functools import partial
+from functools import partial, wraps
import keyword... | diff --git a/tests/test_black.py b/tests/test_black.py
index 759bda5..9d7f579 100644
--- a/tests/test_black.py
+++ b/tests/test_black.py
@@ -150,6 +150,14 @@ class BlackTestCase(unittest.TestCase):
black.assert_equivalent(source, actual)
black.assert_stable(source, actual, line_length=ll)
+ @patc... | Expected tree:
file_input
funcdef
NAME 'def'
NAME ' ' 'func'
parameters
LPAR '('
RPAR ')'
/parameters
COLON ':'
suite
NEWLINE '\n'
INDENT ' '
simple_stmt
expr_stmt
NAME 'lcomp3'
EQUAL ' ' '='
atom
LSQB ' ' '['
... | python -m unittest -q tests.test_black.BlackTestCase.test_comments3 | 728c56c986bc5aea4d9897d3fce3159f89991b8e | tests/comments3.py;tests/test_black.py |
psf__black-9 | psf/black | diff --git a/black.py b/black.py
index b727666..c44bc9b 100644
--- a/black.py
+++ b/black.py
@@ -726,13 +726,13 @@ def get_grammars(target_versions: Set[TargetVersion]) -> List[Grammar]:
if not target_versions:
return GRAMMARS
elif all(not version.is_python2() for version in target_versions):
- ... | diff --git a/tests/test_black.py b/tests/test_black.py
index 7c99f00..645eec7 100644
--- a/tests/test_black.py
+++ b/tests/test_black.py
@@ -461,6 +461,14 @@ class BlackTestCase(unittest.TestCase):
# black.assert_equivalent(source, actual)
black.assert_stable(source, actual, black.FileMode())
+ @... | ======================================================================
ERROR: test_python2_print_function (tests.test_black.BlackTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/opt/conda/envs/aec4dc0199f1038f500bf70b52d8047b/lib/python3.8/unit... | python -m unittest -q tests.test_black.BlackTestCase.test_python2_print_function | 026c81b83454f176a9f9253cbfb70be2c159d822 | tests/data/python2_print_function.py;tests/test_black.py |
psf__black-7 | psf/black | diff --git a/black.py b/black.py
index cada4d0..7bfcfca 100644
--- a/black.py
+++ b/black.py
@@ -2726,6 +2726,14 @@ def normalize_invisible_parens(node: Node, parens_after: Set[str]) -> None:
check_lpar = False
for index, child in enumerate(list(node.children)):
+ # Add parentheses around long tuple ... | diff --git a/tests/test_black.py b/tests/test_black.py
index 86175aa..896ad0c 100644
--- a/tests/test_black.py
+++ b/tests/test_black.py
@@ -542,6 +542,14 @@ class BlackTestCase(unittest.TestCase):
black.assert_equivalent(source, actual)
black.assert_stable(source, actual, black.FileMode())
+ @pa... | Expected tree:
file_input
simple_stmt
expr_stmt
atom
LPAR '('
testlist_gexp
NAME '\n ' 'sdfjklsdfsjldkflkjsf'
COMMA ','
NAME '\n ' 'sdfjsdfjlksdljkfsdlkf'
COMMA ','
NAME '\n ' 'sdfsdjfklsdfjlksdljkf'
COMMA ','
NAM... | python -m unittest -q tests.test_black.BlackTestCase.test_tuple_assign | 18119d38466652ae818436cb497f601294ed4558 | tests/data/tupleassign.py;tests/test_black.py |
psf__black-12 | psf/black | diff --git a/black.py b/black.py
index 85cb45b..0f166c6 100644
--- a/black.py
+++ b/black.py
@@ -877,8 +877,8 @@ class BracketTracker:
bracket_match: Dict[Tuple[Depth, NodeType], Leaf] = Factory(dict)
delimiters: Dict[LeafID, Priority] = Factory(dict)
previous: Optional[Leaf] = None
- _for_loop_variab... | diff --git a/tests/test_black.py b/tests/test_black.py
index 9c798ca..311f635 100644
--- a/tests/test_black.py
+++ b/tests/test_black.py
@@ -453,6 +453,14 @@ class BlackTestCase(unittest.TestCase):
black.assert_equivalent(source, actual)
black.assert_stable(source, actual, line_length=ll)
+ @patc... | ======================================================================
ERROR: test_bracket_match (tests.test_black.BlackTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/opt/conda/envs/5cb45a3af35d91ebe6796d6535bfc272/lib/python3.8/unittest/mock... | python -m unittest -q tests.test_black.BlackTestCase.test_bracket_match | 8b340e210271a8108995fd479c55dbc0a34466bd | tests/data/bracketmatch.py;tests/test_black.py |
End of preview. Expand in Data Studio
README.md exists but content is empty.
- Downloads last month
- 60