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 |
psf__black-6 | psf/black | diff --git a/black.py b/black.py
index c96d205..c8aa30b 100644
--- a/black.py
+++ b/black.py
@@ -48,6 +48,7 @@ from blib2to3 import pygram, pytree
from blib2to3.pgen2 import driver, token
from blib2to3.pgen2.grammar import Grammar
from blib2to3.pgen2.parse import ParseError
+from blib2to3.pgen2.tokenize import Token... | diff --git a/tests/test_black.py b/tests/test_black.py
index 59343ef..0ea4ac5 100644
--- a/tests/test_black.py
+++ b/tests/test_black.py
@@ -502,8 +502,24 @@ class BlackTestCase(unittest.TestCase):
self.assertFormatEqual(expected, actual)
black.assert_stable(source, actual, mode)
+ @patch("black.... | 0
======================================================================
ERROR: test_async_as_identifier (tests.test_black.BlackTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/opt/conda/envs/9a5e1cb72f6ccedabd1a075e4161dd27/lib/python3.8/uni... | python -m unittest -q tests.test_black.BlackTestCase.test_async_as_identifier
python -m unittest -q tests.test_black.BlackTestCase.test_python37 | 8c8adedc2a74a494c24f93e405b6418ac32f54cd | tests/test_black.py;tests/data/comment_after_escaped_newline.py |
psf__black-2 | psf/black | diff --git a/black.py b/black.py
index 2df03f7..e55e4fe 100644
--- a/black.py
+++ b/black.py
@@ -3116,18 +3116,49 @@ def generate_ignored_nodes(leaf: Leaf) -> Iterator[LN]:
"""
container: Optional[LN] = container_of(leaf)
while container is not None and container.type != token.ENDMARKER:
- is_fmt_... | diff --git a/tests/test_black.py b/tests/test_black.py
index 7a4a3bb..15b6341 100644
--- a/tests/test_black.py
+++ b/tests/test_black.py
@@ -632,6 +632,14 @@ class BlackTestCase(unittest.TestCase):
black.assert_equivalent(source, actual)
black.assert_stable(source, actual, black.FileMode())
+ @pa... | ======================================================================
ERROR: test_fmtonoff4 (tests.test_black.BlackTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/opt/conda/envs/9975e41e088302bd9e3d9af7a8db556f/lib/python3.8/unittest/mock.py"... | python -m unittest -q tests.test_black.BlackTestCase.test_fmtonoff4 | c8ca6b2b9ff3510bee12129824cebfc2fc51e5b2 | tests/test_black.py |
psf__black-21 | psf/black | diff --git a/black.py b/black.py
index 537ba59..587d9b3 100644
--- a/black.py
+++ b/black.py
@@ -2325,7 +2325,7 @@ def dump_to_file(*output: str) -> str:
import tempfile
with tempfile.NamedTemporaryFile(
- mode="w", prefix="blk_", suffix=".log", delete=False
+ mode="w", prefix="blk_", suffix="... | diff --git a/tests/test_black.py b/tests/test_black.py
index f71f9b3..6e6aad8 100644
--- a/tests/test_black.py
+++ b/tests/test_black.py
@@ -150,7 +150,7 @@ class BlackTestCase(unittest.TestCase):
tmp_file = Path(black.dump_to_file(source))
try:
self.assertTrue(ff(tmp_file, write_back=bla... | ----------------------------------------------------------------------
Ran 1 test in 0.162s
OK | python -m unittest -q tests.test_black.BlackTestCase.test_expression_ff | c071af761e1550c6e4ebab8e5af747d2d8fdd48e | tests/test_black.py |
psf__black-3 | psf/black | diff --git a/black.py b/black.py
index d9348a3..26a2915 100644
--- a/black.py
+++ b/black.py
@@ -394,7 +394,7 @@ def target_version_option_callback(
@click.option(
"--config",
type=click.Path(
- exists=False, file_okay=True, dir_okay=False, readable=True, allow_dash=False
+ exists=True, file_ok... | diff --git a/tests/test_black.py b/tests/test_black.py
index acbaade..7a4a3bb 100644
--- a/tests/test_black.py
+++ b/tests/test_black.py
@@ -1645,6 +1645,16 @@ class BlackTestCase(unittest.TestCase):
raise result.exception
self.assertEqual(result.exit_code, 0)
+ def test_invalid_confi... | ======================================================================
FAIL: test_invalid_config_return_code (tests.test_black.BlackTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/user/BugsInPy/temp/projects/black/tests/test_black.py", li... | python -m unittest -q tests.test_black.BlackTestCase.test_invalid_config_return_code | 8126b4f6a9342290de4655e6a8a78cd288ce7daa | tests/test_black.py |
psf__black-10 | psf/black | diff --git a/blib2to3/pgen2/driver.py b/blib2to3/pgen2/driver.py
index 72d9f47..6626c05 100644
--- a/blib2to3/pgen2/driver.py
+++ b/blib2to3/pgen2/driver.py
@@ -131,10 +131,8 @@ class Driver(object):
current_line = ""
current_column = 0
wait_for_nl = False
... | diff --git a/tests/test_black.py b/tests/test_black.py
index b3f1f82..92031ca 100644
--- a/tests/test_black.py
+++ b/tests/test_black.py
@@ -509,6 +509,19 @@ class BlackTestCase(unittest.TestCase):
black.assert_equivalent(source, actual)
black.assert_stable(source, actual, line_length=ll)
+ def t... | Expected tree:
file_input
if_stmt
NAME 'if'
NUMBER ' ' '1'
COLON ':'
suite
NEWLINE '\n'
INDENT ''
if_stmt
NAME ' ' 'if'
NUMBER ' ' '2'
COLON ':'
suite
NEWLINE '\n'
INDENT ''
simple_stmt
NAME ' ' 'pass... | python -m unittest -q tests.test_black.BlackTestCase.test_comment_indentation | f6643c4f0cfbae1f2493fdfce46cfbae3d26f46b | tests/test_black.py |
psf__black-23 | psf/black | diff --git a/black.py b/black.py
index bb8ec2e..7935cdc 100644
--- a/black.py
+++ b/black.py
@@ -235,23 +235,36 @@ def format_str(src_contents: str, line_length: int) -> FileContent:
return dst_contents
+GRAMMARS = [
+ pygram.python_grammar_no_print_statement_no_exec_statement,
+ pygram.python_grammar_no... | diff --git a/tests/test_black.py b/tests/test_black.py
index 69746d1..3415549 100644
--- a/tests/test_black.py
+++ b/tests/test_black.py
@@ -180,6 +180,14 @@ class BlackTestCase(unittest.TestCase):
black.assert_equivalent(source, actual)
black.assert_stable(source, actual, line_length=ll)
+ @patc... | Expected tree:
file_input
simple_stmt
import_name
NAME '#!/usr/bin/env python2\n\n' 'import'
NAME ' ' 'sys'
/import_name
NEWLINE '\n'
/simple_stmt
simple_stmt
testlist_star_expr
shift_expr
NAME '\n' 'print'
RIGHTSHIFT ' ' '>>'
power
NAME 'sys'
... | python -m unittest -q tests.test_black.BlackTestCase.test_python2 | 8de552eb4f0fbf1ad84812cde71489cc00d3ed1f | tests/python2.py;tests/test_black.py |
psf__black-8 | psf/black | diff --git a/black.py b/black.py
index dd6e372..9ecfbe1 100644
--- a/black.py
+++ b/black.py
@@ -2405,10 +2405,17 @@ def bracket_split_build_line(
if leaves:
# Since body is a new indent level, remove spurious leading whitespace.
normalize_prefix(leaves[0], inside_brackets=True)
- ... | diff --git a/tests/test_black.py b/tests/test_black.py
index 3e0b8a1..86175aa 100644
--- a/tests/test_black.py
+++ b/tests/test_black.py
@@ -388,6 +388,14 @@ class BlackTestCase(unittest.TestCase):
black.assert_equivalent(source, actual)
black.assert_stable(source, actual, black.FileMode())
+ @pa... | Expected tree:
file_input
simple_stmt
import_from
NAME 'from'
DOT ' ' '.'
NAME 'config'
NAME ' ' 'import'
LPAR ' ' '('
import_as_names
NAME '\n ' 'Any'
COMMA ','
NAME '\n ' 'Bool'
COMMA ','
NAME '\n ' 'ConfigType'
COMMA '... | python -m unittest -q tests.test_black.BlackTestCase.test_comments7 | e6ddb68c786256e1cb0c76b42d10c212ef34cb2a | tests/data/comments7.py;tests/test_black.py |
psf__black-17 | psf/black | diff --git a/black.py b/black.py
index 46c0907..c6b018f 100644
--- a/black.py
+++ b/black.py
@@ -607,6 +607,9 @@ def decode_bytes(src: bytes) -> Tuple[FileContent, Encoding, NewLine]:
"""
srcbuf = io.BytesIO(src)
encoding, lines = tokenize.detect_encoding(srcbuf.readline)
+ if not lines:
+ retu... | diff --git a/tests/test_black.py b/tests/test_black.py
index f6952c7..e98f019 100644
--- a/tests/test_black.py
+++ b/tests/test_black.py
@@ -100,6 +100,25 @@ class BlackTestCase(unittest.TestCase):
black.err(str(ve))
self.assertEqual(expected, actual)
+ @patch("black.dump_to_file", dump_t... | ======================================================================
ERROR: test_empty (tests.test_black.BlackTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/opt/conda/envs/000e642a2238316a31276b441184e2a5/lib/python3.8/unittest/mock.py", li... | python -m unittest -q tests.test_black.BlackTestCase.test_empty | bbc09a4f013f2a584f143f3f5e3f76f6082367d4 | tests/test_black.py |
psf__black-15 | psf/black | diff --git a/black.py b/black.py
index 7682f7c..7e39c92 100644
--- a/black.py
+++ b/black.py
@@ -29,7 +29,6 @@ from typing import (
Sequence,
Set,
Tuple,
- Type,
TypeVar,
Union,
cast,
@@ -90,34 +89,6 @@ class CannotSplit(Exception):
"""
-class FormatError(Exception):
- """Ba... | diff --git a/tests/test_black.py b/tests/test_black.py
index 3418df9..6638dc4 100644
--- a/tests/test_black.py
+++ b/tests/test_black.py
@@ -400,6 +400,14 @@ class BlackTestCase(unittest.TestCase):
black.assert_equivalent(source, actual)
black.assert_stable(source, actual, line_length=ll)
+ @patc... | Expected tree:
file_input
simple_stmt
import_name
NAME 'import'
NAME ' ' 'pytest'
/import_name
NEWLINE '\n'
/simple_stmt
simple_stmt
expr_stmt
NAME '\n' 'TmSt'
EQUAL ' ' '='
NUMBER ' ' '1'
/expr_stmt
NEWLINE '\n'
/simple_stmt
simple_stmt
expr_stmt
... | python -m unittest -q tests.test_black.BlackTestCase.test_fmtonoff2 | 8a8c58252cc023ae250d6febd24f50a8166450d4 | tests/data/fmtonoff2.py;tests/test_black.py |
psf__black-11 | psf/black | diff --git a/black.py b/black.py
index 52c5b0c..fb8e474 100644
--- a/black.py
+++ b/black.py
@@ -2112,8 +2112,19 @@ def split_line(
return
line_str = str(line).strip("\n")
- if not line.should_explode and is_line_short_enough(
- line, line_length=line_length, line_str=line_str
+
+ # we don'... | diff --git a/tests/test_black.py b/tests/test_black.py
index 1d759f2..078e8d8 100644
--- a/tests/test_black.py
+++ b/tests/test_black.py
@@ -362,6 +362,14 @@ class BlackTestCase(unittest.TestCase):
black.assert_equivalent(source, actual)
black.assert_stable(source, actual, line_length=ll)
+ @patc... | Expected tree:
file_input
simple_stmt
import_from
NAME 'from'
NAME ' ' 'typing'
NAME ' ' 'import'
import_as_names
NAME ' ' 'Any'
COMMA ','
NAME ' ' 'Tuple'
/import_as_names
/import_from
NEWLINE '\n'
/simple_stmt
funcdef
NAME '\n\n' 'def'
NA... | python -m unittest -q tests.test_black.BlackTestCase.test_comments6 | 283a5d53a8d57e8e186a08c9fbf249e1fbe7bc94 | tests/data/comments6.py;tests/test_black.py |
psf__black-20 | psf/black | diff --git a/black.py b/black.py
index dd2e2d1..eafc9e7 100644
--- a/black.py
+++ b/black.py
@@ -341,8 +341,8 @@ def format_file_in_place(
with open(src, "w", encoding=src_buffer.encoding) as f:
f.write(dst_contents)
elif write_back == write_back.DIFF:
- src_name = f"{src.name} (origi... | diff --git a/tests/test_black.py b/tests/test_black.py
index ba834c5..6f0ffa3 100644
--- a/tests/test_black.py
+++ b/tests/test_black.py
@@ -200,7 +200,7 @@ class BlackTestCase(unittest.TestCase):
self.assertTrue(ff(tmp_file, write_back=black.WriteBack.DIFF))
sys.stdout.seek(0)
ac... | ======================================================================
FAIL: test_expression_diff (tests.test_black.BlackTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/user/BugsInPy/temp/projects/black/tests/test_black.py", line 215, in ... | python -m unittest -q tests.test_black.BlackTestCase.test_expression_diff | 2e52a2b3ecc0fe025439c3db05a4457ab14f167b | tests/test_black.py |
psf__black-18 | psf/black | diff --git a/black.py b/black.py
index e59a1e5..36e49b0 100644
--- a/black.py
+++ b/black.py
@@ -4,6 +4,7 @@ from asyncio.base_events import BaseEventLoop
from concurrent.futures import Executor, ProcessPoolExecutor
from enum import Enum, Flag
from functools import partial, wraps
+import io
import keyword
import l... | diff --git a/tests/test_black.py b/tests/test_black.py
index adf5ede..1f93e6a 100644
--- a/tests/test_black.py
+++ b/tests/test_black.py
@@ -3,7 +3,7 @@ import asyncio
from concurrent.futures import ThreadPoolExecutor
from contextlib import contextmanager
from functools import partial
-from io import StringIO
+from ... | ======================================================================
FAIL: test_preserves_line_endings (tests.test_black.BlackTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/user/BugsInPy/temp/projects/black/tests/test_black.py", line 1... | python -m unittest -q tests.test_black.BlackTestCase.test_preserves_line_endings | dbe26161fa68632d608a440666a0960a32630902 | tests/test_black.py |
psf__black-14 | psf/black | diff --git a/black.py b/black.py
index f49e6df..36a180d 100644
--- a/black.py
+++ b/black.py
@@ -20,6 +20,7 @@ from typing import (
Callable,
Collection,
Dict,
+ Generator,
Generic,
Iterable,
Iterator,
@@ -2910,7 +2911,23 @@ def generate_trailers_to_omit(line: Line, line_length: int) ->... | diff --git a/tests/test_black.py b/tests/test_black.py
index 8a37197..cc53aa6 100644
--- a/tests/test_black.py
+++ b/tests/test_black.py
@@ -735,6 +735,14 @@ class BlackTestCase(unittest.TestCase):
self.assertEqual(set(), black.get_future_imports(node))
node = black.lib2to3_parse("from some.module imp... | ======================================================================
FAIL: test_get_future_imports (tests.test_black.BlackTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/user/BugsInPy/temp/projects/black/tests/test_black.py", line 741, ... | python -m unittest -q tests.test_black.BlackTestCase.test_get_future_imports | 3bdd42389128bbbe8b64a8e050563f09bff99979 | tests/test_black.py |
psf__black-5 | psf/black | diff --git a/black.py b/black.py
index 635eba2..8318674 100644
--- a/black.py
+++ b/black.py
@@ -1352,7 +1352,10 @@ class Line:
bracket_depth = leaf.bracket_depth
if bracket_depth == depth and leaf.type == token.COMMA:
commas += 1
- if leaf.parent and leaf.paren... | diff --git a/tests/test_black.py b/tests/test_black.py
index 88c03d0..828b3e4 100644
--- a/tests/test_black.py
+++ b/tests/test_black.py
@@ -264,6 +264,14 @@ class BlackTestCase(unittest.TestCase):
black.assert_equivalent(source, actual)
black.assert_stable(source, actual, black.FileMode())
+ @pa... | ======================================================================
ERROR: test_function_trailing_comma (tests.test_black.BlackTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/opt/conda/envs/ec2960e027b850ea197b3f2b8fc7f7ea/lib/python3.8/uni... | python -m unittest -q tests.test_black.BlackTestCase.test_function_trailing_comma | 1bbb01b854d168d76ebe4bf78961c2152ae075d9 | tests/test_black.py |
psf__black-16 | psf/black | diff --git a/black.py b/black.py
index 9d9bada..e3b3882 100644
--- a/black.py
+++ b/black.py
@@ -2941,11 +2941,24 @@ def gen_python_files_in_dir(
"""Generate all files under `path` whose paths are not excluded by the
`exclude` regex, but are included by the `include` regex.
+ Symbolic links pointing outs... | diff --git a/tests/test_black.py b/tests/test_black.py
index 84b7a61..3418df9 100644
--- a/tests/test_black.py
+++ b/tests/test_black.py
@@ -11,7 +11,7 @@ import sys
from tempfile import TemporaryDirectory
from typing import Any, BinaryIO, Generator, List, Tuple, Iterator
import unittest
-from unittest.mock import p... | ======================================================================
ERROR: test_symlink_out_of_root_directory (tests.test_black.BlackTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/user/BugsInPy/temp/projects/black/tests/test_black.py"... | python -m unittest -q tests.test_black.BlackTestCase.test_symlink_out_of_root_directory | fb34c9e19589d05f92084a28940837151251ebd6 | tests/test_black.py |
psf__black-1 | psf/black | diff --git a/black.py b/black.py
index 2a913fc..fc1597a 100644
--- a/black.py
+++ b/black.py
@@ -618,7 +618,14 @@ def reformat_many(
if sys.platform == "win32":
# Work around https://bugs.python.org/issue26903
worker_count = min(worker_count, 61)
- executor = ProcessPoolExecutor(max_workers=wo... | diff --git a/tests/test_black.py b/tests/test_black.py
index 11bba1f..a0e57dc 100644
--- a/tests/test_black.py
+++ b/tests/test_black.py
@@ -1273,6 +1273,27 @@ class BlackTestCase(unittest.TestCase):
self.assertIn(one, cache)
self.assertIn(two, cache)
+ @patch("black.ProcessPoolExecutor",... | ======================================================================
FAIL: test_works_in_mono_process_only_environment (tests.test_black.BlackTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/opt/conda/envs/87b58448f32fe09241efe0a490d468af/lib... | python -m unittest -q tests.test_black.BlackTestCase.test_works_in_mono_process_only_environment | 26c9465a22c732ab1e17b0dec578fa3432e9b558 | tests/test_black.py |
cookiecutter__cookiecutter-4 | cookiecutter/cookiecutter | diff --git a/cookiecutter/exceptions.py b/cookiecutter/exceptions.py
index 0ad6b58..415f99e 100755
--- a/cookiecutter/exceptions.py
+++ b/cookiecutter/exceptions.py
@@ -81,3 +81,9 @@ class InvalidModeException(CookiecutterException):
Raised when cookiecutter is called with both `no_input==True` and
`replay==T... | diff --git a/tests/test_hooks.py b/tests/test_hooks.py
index 8df394f..e7f7ee1 100755
--- a/tests/test_hooks.py
+++ b/tests/test_hooks.py
@@ -11,8 +11,9 @@ Tests for `cookiecutter.hooks` module.
import sys
import os
import stat
+import pytest
-from cookiecutter import hooks, utils
+from cookiecutter import hooks, u... | GLOB sdist-make: /home/user/BugsInPy/temp/projects/cookiecutter/setup.py
py27 create: /home/user/BugsInPy/temp/projects/cookiecutter/.tox/py27
ERROR: InterpreterNotFound: python2.7
py33 create: /home/user/BugsInPy/temp/projects/cookiecutter/.tox/py33
ERROR: InterpreterNotFound: python3.3
py34 create: /home/user/BugsInP... | tox tests/test_hooks.py::TestExternalHooks::test_run_failing_hook | 9568ab6ecd2d6836646006c59473c4a4ac0dee04 | tests/test_hooks.py |
cookiecutter__cookiecutter-2 | cookiecutter/cookiecutter | diff --git a/cookiecutter/hooks.py b/cookiecutter/hooks.py
index 20ccae2..3c73f74 100644
--- a/cookiecutter/hooks.py
+++ b/cookiecutter/hooks.py
@@ -54,11 +54,14 @@ def find_hook(hook_name, hooks_dir='hooks'):
logger.debug('No hooks/dir in template_dir')
return None
+ scripts = []
for hook_f... | diff --git a/tests/test_hooks.py b/tests/test_hooks.py
index be4038f..bd374ad 100644
--- a/tests/test_hooks.py
+++ b/tests/test_hooks.py
@@ -9,7 +9,7 @@ import pytest
from cookiecutter import hooks, utils, exceptions
-def make_test_repo(name):
+def make_test_repo(name, multiple_hooks=False):
"""Create test re... | 0
lint recreate: /home/user/BugsInPy/temp/projects/cookiecutter/.tox/lint
lint installdeps: pre-commit>=1.20.0
lint installed: cfgv==3.3.1,distlib==0.3.6,filelock==3.4.1,identify==2.4.4,importlib-metadata==4.8.3,importlib-resources==5.2.3,nodeenv==1.6.0,platformdirs==2.4.0,pre-commit==2.17.0,PyYAML==6.0,toml==0.10.2,... | tox tests/test_hooks.py::TestFindHooks::test_find_hook
tox tests/test_hooks.py::TestExternalHooks::test_run_hook | d7e7b28811e474e14d1bed747115e47dcdd15ba3 | tests/test_hooks.py |
cookiecutter__cookiecutter-3 | cookiecutter/cookiecutter | diff --git a/cookiecutter/prompt.py b/cookiecutter/prompt.py
index 45a065b..da4ada2 100644
--- a/cookiecutter/prompt.py
+++ b/cookiecutter/prompt.py
@@ -88,7 +88,7 @@ def read_user_choice(var_name, options):
))
user_choice = click.prompt(
- prompt, type=click.Choice(choices), default=default
+ ... | diff --git a/tests/test_read_user_choice.py b/tests/test_read_user_choice.py
index 0f9e003..0e81c2d 100644
--- a/tests/test_read_user_choice.py
+++ b/tests/test_read_user_choice.py
@@ -29,7 +29,8 @@ def test_click_invocation(mocker, user_choice, expected_value):
prompt.assert_called_once_with(
EXPECTED_PR... | GLOB sdist-make: /home/user/BugsInPy/temp/projects/cookiecutter/setup.py
lint recreate: /home/user/BugsInPy/temp/projects/cookiecutter/.tox/lint
lint installdeps: pre-commit>=1.17.0
lint installed: cfgv==3.3.1,distlib==0.3.6,filelock==3.4.1,identify==2.4.4,importlib-metadata==4.8.3,importlib-resources==5.2.3,nodeenv==1... | tox tests/test_read_user_choice.py::test_click_invocation | 5c282f020a8db7e5e7c4e7b51b010556ca31fb7f | tests/test_read_user_choice.py |
cookiecutter__cookiecutter-1 | cookiecutter/cookiecutter | diff --git a/cookiecutter/generate.py b/cookiecutter/generate.py
index 37365a4..c526b97 100644
--- a/cookiecutter/generate.py
+++ b/cookiecutter/generate.py
@@ -82,7 +82,7 @@ def generate_context(
context = OrderedDict([])
try:
- with open(context_file) as file_handle:
+ with open(context_file... | diff --git a/tests/test_generate_context.py b/tests/test_generate_context.py
index 26e7d4d..69d0148 100644
--- a/tests/test_generate_context.py
+++ b/tests/test_generate_context.py
@@ -108,6 +108,17 @@ def test_default_context_replacement_in_generate_context():
assert generated_context == expected_context
+def... | lint create: /home/user/BugsInPy/temp/projects/cookiecutter/.tox/lint
lint installdeps: pre-commit>=1.20.0
lint installed: cfgv==3.3.1,distlib==0.3.6,filelock==3.4.1,identify==2.4.4,importlib-metadata==4.8.3,importlib-resources==5.2.3,nodeenv==1.6.0,platformdirs==2.4.0,pre-commit==2.17.0,PyYAML==6.0,toml==0.10.2,typing... | tox tests/test_generate_context.py::test_generate_context_decodes_non_ascii_chars | c15633745df6abdb24e02746b82aadb20b8cdf8c | tests/test_generate_context.py |
tiangolo__fastapi-4 | tiangolo/fastapi | diff --git a/fastapi/openapi/utils.py b/fastapi/openapi/utils.py
index d53ee6b..91f90ec 100644
--- a/fastapi/openapi/utils.py
+++ b/fastapi/openapi/utils.py
@@ -180,7 +180,9 @@ def get_openapi_path(
operation_parameters = get_openapi_operation_parameters(all_route_params)
parameters.extend(ope... | ============================= test session starts ==============================
platform linux -- Python 3.8.3, pytest-5.4.3, py-1.8.1, pluggy-0.13.1
rootdir: /home/user/BugsInPy/temp/projects/fastapi
plugins: cov-2.9.0
collected 1 item
tests/test_param_in_path_and_dependency.py F [100%]
... | pytest tests/test_param_in_path_and_dependency.py::test_reused_param | 7ccd81f70653857bd8f3a15ee946aa3fb0edc2cb | tests/test_param_in_path_and_dependency.py | |
tiangolo__fastapi-13 | tiangolo/fastapi | diff --git a/fastapi/routing.py b/fastapi/routing.py
index e768c3a..2bdf46d 100644
--- a/fastapi/routing.py
+++ b/fastapi/routing.py
@@ -285,11 +285,11 @@ class APIRouter(routing.Router):
assert not prefix.endswith(
"/"
), "A path prefix must not end with '/', as the routes wi... | ============================= test session starts ==============================
platform linux -- Python 3.8.3, pytest-5.4.3, py-1.8.1, pluggy-0.13.1
rootdir: /home/user/BugsInPy/temp/projects/fastapi
plugins: cov-2.9.0
collected 1 item
tests/test_additional_responses_router.py F [100%]
... | pytest tests/test_additional_responses_router.py::test_openapi_schema | 6f7f9268f6b03f42831dcfeaa5c15ba9813333ec | tests/test_additional_responses_router.py | |
tiangolo__fastapi-9 | tiangolo/fastapi | diff --git a/fastapi/dependencies/utils.py b/fastapi/dependencies/utils.py
index f9e42d0..7f0f590 100644
--- a/fastapi/dependencies/utils.py
+++ b/fastapi/dependencies/utils.py
@@ -559,6 +559,8 @@ def get_body_field(*, dependant: Dependant, name: str) -> Optional[Field]:
for f in flat_dependant.body_params:
... | ============================= test session starts ==============================
platform linux -- Python 3.8.3, pytest-5.4.3, py-1.8.1, pluggy-0.13.1
rootdir: /home/user/BugsInPy/temp/projects/fastapi
plugins: cov-2.9.0
collected 1 item
tests/test_request_body_parameters_media_type.py F [100%]
... | pytest tests/test_request_body_parameters_media_type.py::test_openapi_schema | a7a92bc63768ccee3f3afc2b73b2c581928dfe75 | tests/test_request_body_parameters_media_type.py | |
tiangolo__fastapi-7 | tiangolo/fastapi | diff --git a/fastapi/exception_handlers.py b/fastapi/exception_handlers.py
index cda2f8c..2b286d7 100644
--- a/fastapi/exception_handlers.py
+++ b/fastapi/exception_handlers.py
@@ -1,3 +1,4 @@
+from fastapi.encoders import jsonable_encoder
from fastapi.exceptions import RequestValidationError
from starlette.exception... | diff --git a/tests/test_multi_body_errors.py b/tests/test_multi_body_errors.py
index ef07c2a8..5824cda2 100644
--- a/tests/test_multi_body_errors.py
+++ b/tests/test_multi_body_errors.py
@@ -1,7 +1,8 @@
+from decimal import Decimal
from typing import List
from fastapi import FastAPI
-from pydantic import BaseModel
... | ============================= test session starts ==============================
platform linux -- Python 3.8.3, pytest-5.4.3, py-1.8.1, pluggy-0.13.1
rootdir: /home/user/BugsInPy/temp/projects/fastapi
plugins: cov-2.9.0
collected 1 item
tests/test_multi_body_errors.py F [100%]
... | pytest tests/test_multi_body_errors.py::test_jsonable_encoder_requiring_error | cc4c13e4ae3f65fc76c23962b316df4a60e0c7e0 | tests/test_multi_body_errors.py |
tiangolo__fastapi-12 | tiangolo/fastapi | diff --git a/fastapi/security/http.py b/fastapi/security/http.py
index f41d8d9..362390b 100644
--- a/fastapi/security/http.py
+++ b/fastapi/security/http.py
@@ -112,10 +112,13 @@ class HTTPBearer(HTTPBase):
else:
return None
if scheme.lower() != "bearer":
- raise HTTPEx... | diff --git a/tests/test_security_http_bearer_optional.py b/tests/test_security_http_bearer_optional.py
index 5a690c52..d34433ec 100644
--- a/tests/test_security_http_bearer_optional.py
+++ b/tests/test_security_http_bearer_optional.py
@@ -64,5 +64,5 @@ def test_security_http_bearer_no_credentials():
def test_securit... | ============================= test session starts ==============================
platform linux -- Python 3.8.3, pytest-5.4.3, py-1.8.1, pluggy-0.13.1
rootdir: /home/user/BugsInPy/temp/projects/fastapi
plugins: cov-2.9.0
collected 1 item
tests/test_security_http_bearer_optional.py F [100%]
... | pytest tests/test_security_http_bearer_optional.py::test_security_http_bearer_incorrect_scheme_credentials | d61f5e4b555b123bf222503fc0e076cbae6a7ebc | tests/test_security_http_bearer_optional.py |
tiangolo__fastapi-6 | tiangolo/fastapi | diff --git a/fastapi/dependencies/utils.py b/fastapi/dependencies/utils.py
index 956ffff..a1cc0b9 100644
--- a/fastapi/dependencies/utils.py
+++ b/fastapi/dependencies/utils.py
@@ -629,9 +629,9 @@ async def request_body_to_args(
for field in required_params:
value: Any = None
if recei... | RUN EVERY COMMAND
0
============================= test session starts ==============================
platform linux -- Python 3.8.3, pytest-5.4.3, py-1.8.1, pluggy-0.13.1
rootdir: /home/user/BugsInPy/temp/projects/fastapi
plugins: cov-2.9.0
collected 1 item
tests/test_forms_from_non_typing_sequences.py F ... | pytest tests/test_forms_from_non_typing_sequences.py::test_python_list_param_as_form
pytest tests/test_forms_from_non_typing_sequences.py::test_python_set_param_as_form
pytest tests/test_forms_from_non_typing_sequences.py::test_python_tuple_param_as_form | 5db99a27cf640864b4793807811848698c5ff4a2 | tests/test_forms_from_non_typing_sequences.py | |
tiangolo__fastapi-2 | tiangolo/fastapi | diff --git a/fastapi/routing.py b/fastapi/routing.py
index b90935e..1ec0b69 100644
--- a/fastapi/routing.py
+++ b/fastapi/routing.py
@@ -498,7 +498,12 @@ class APIRouter(routing.Router):
def add_api_websocket_route(
self, path: str, endpoint: Callable, name: str = None
) -> None:
- route = API... | diff --git a/tests/test_ws_router.py b/tests/test_ws_router.py
index fd19e650..dd045612 100644
--- a/tests/test_ws_router.py
+++ b/tests/test_ws_router.py
@@ -1,4 +1,4 @@
-from fastapi import APIRouter, FastAPI, WebSocket
+from fastapi import APIRouter, Depends, FastAPI, WebSocket
from fastapi.testclient import TestCl... | ============================= test session starts ==============================
platform linux -- Python 3.8.3, pytest-5.4.3, py-1.8.1, pluggy-0.13.1
rootdir: /home/user/BugsInPy/temp/projects/fastapi
plugins: cov-2.9.0
collected 1 item
tests/test_ws_router.py F [100%]
... | pytest tests/test_ws_router.py::test_router_ws_depends_with_override | 210af1fd3dc0f612a08fa02a0cb3f5adb81e5bfb | tests/test_ws_router.py |
tiangolo__fastapi-3 | tiangolo/fastapi | diff --git a/fastapi/routing.py b/fastapi/routing.py
index b361048..b90935e 100644
--- a/fastapi/routing.py
+++ b/fastapi/routing.py
@@ -48,6 +48,28 @@ except ImportError: # pragma: nocover
from pydantic.fields import Field as ModelField # type: ignore
+def _prepare_response_content(
+ res: Any, *, by_ali... | pytest tests/test_serialize_response_model.py::test_validdict
pytest tests/test_serialize_response_model.py::test_valid_exclude_unset
pytest tests/test_serialize_response_model.py::test_coerce_exclude_unset
pytest tests/test_serialize_response_model.py::test_validlist_exclude_unset
pytest tests/test_serialize_response_... | pytest tests/test_serialize_response_model.py::test_valid
pytest tests/test_serialize_response_model.py::test_coerce
pytest tests/test_serialize_response_model.py::test_validlist
pytest tests/test_serialize_response_model.py::test_validdict
pytest tests/test_serialize_response_model.py::test_valid_exclude_unset
pytest ... | 869c7389e22dc9ad659940fa271da76c4f3ba3b1 | tests/test_serialize_response_model.py | |
tiangolo__fastapi-10 | tiangolo/fastapi | diff --git a/fastapi/routing.py b/fastapi/routing.py
index 3c6774c..930cbe0 100644
--- a/fastapi/routing.py
+++ b/fastapi/routing.py
@@ -52,6 +52,8 @@ def serialize_response(
errors.extend(errors_)
if errors:
raise ValidationError(errors)
+ if skip_defaults and isinstance(respo... | ============================= test session starts ==============================
platform linux -- Python 3.8.3, pytest-5.4.3, py-1.8.1, pluggy-0.13.1
rootdir: /home/user/BugsInPy/temp/projects/fastapi
plugins: cov-2.9.0
collected 1 item
tests/test_skip_defaults.py F [100%]
... | pytest tests/test_skip_defaults.py::test_return_defaults | b77a43bcac3ec8e7edbe82543e777c60ae85c178 | tests/test_skip_defaults.py | |
tiangolo__fastapi-8 | tiangolo/fastapi | diff --git a/fastapi/routing.py b/fastapi/routing.py
index 8f61ea5..b090231 100644
--- a/fastapi/routing.py
+++ b/fastapi/routing.py
@@ -348,8 +348,10 @@ class APIRouter(routing.Router):
include_in_schema: bool = True,
response_class: Type[Response] = None,
name: str = None,
+ route_cl... | ============================= test session starts ==============================
platform linux -- Python 3.8.3, pytest-5.4.3, py-1.8.1, pluggy-0.13.1
rootdir: /home/user/BugsInPy/temp/projects/fastapi
plugins: cov-2.9.0
collected 1 item
tests/test_custom_route_class.py F [100%]
... | pytest tests/test_custom_route_class.py::test_route_classes | fdb6d43e103bcf7a7325d796e37c9435c9460e4c | tests/test_custom_route_class.py | |
tiangolo__fastapi-15 | tiangolo/fastapi | diff --git a/fastapi/routing.py b/fastapi/routing.py
index 6d252d8..67619bd 100644
--- a/fastapi/routing.py
+++ b/fastapi/routing.py
@@ -271,6 +271,10 @@ class APIRouter(routing.Router):
include_in_schema=route.include_in_schema,
name=route.name,
)
+ ... | 0
============================= test session starts ==============================
platform linux -- Python 3.8.3, pytest-5.4.3, py-1.8.1, pluggy-0.13.1
rootdir: /home/user/BugsInPy/temp/projects/fastapi
plugins: cov-2.9.0
collected 1 item
tests/test_ws_router.py F [100... | pytest tests/test_ws_router.py::test_router
pytest tests/test_ws_router.py::test_prefix_router | b16ca54c30644667ab9f65a712704850666a039c | tests/test_ws_router.py | |
tiangolo__fastapi-11 | tiangolo/fastapi | diff --git a/fastapi/dependencies/utils.py b/fastapi/dependencies/utils.py
index 28c57c2..c898ab7 100644
--- a/fastapi/dependencies/utils.py
+++ b/fastapi/dependencies/utils.py
@@ -131,12 +131,17 @@ def get_flat_dependant(dependant: Dependant) -> Dependant:
def is_scalar_field(field: Field) -> bool:
- return (
... | pytest tests/test_union_inherited_body.py::test_inherited_item_openapi_schema
pytest tests/test_union_inherited_body.py::test_post_extended_item
pytest tests/test_union_inherited_body.py::test_post_item
RUN EVERY COMMAND
0
============================= test session starts ==============================
platform linux... | pytest tests/test_union_body.py::test_item_openapi_schema
pytest tests/test_union_body.py::test_post_other_item
pytest tests/test_union_body.py::test_post_item
pytest tests/test_union_inherited_body.py::test_inherited_item_openapi_schema
pytest tests/test_union_inherited_body.py::test_post_extended_item
pytest tests/te... | bf229ad5d830eb5320f966d51a55e590e8d57008 | tests/test_union_body.py;tests/test_union_inherited_body.py | |
tiangolo__fastapi-14 | tiangolo/fastapi | diff --git a/fastapi/openapi/models.py b/fastapi/openapi/models.py
index 6572c7c..a045bdf 100644
--- a/fastapi/openapi/models.py
+++ b/fastapi/openapi/models.py
@@ -99,7 +99,7 @@ class SchemaBase(BaseModel):
not_: Optional[List[Any]] = PSchema(None, alias="not") # type: ignore
items: Optional[Any] = None
... | ============================= test session starts ==============================
platform linux -- Python 3.8.3, pytest-5.4.3, py-1.8.1, pluggy-0.13.1
rootdir: /home/user/BugsInPy/temp/projects/fastapi
plugins: cov-2.9.0
collected 1 item
tests/test_additional_properties.py F [100%]
... | pytest tests/test_additional_properties.py::test_additional_properties_schema | 2ddb804940bbcad4ed730b2a910c8fd3c1167127 | tests/test_additional_properties.py | |
tiangolo__fastapi-5 | tiangolo/fastapi | diff --git a/fastapi/utils.py b/fastapi/utils.py
index a068cc5..6a0c1bf 100644
--- a/fastapi/utils.py
+++ b/fastapi/utils.py
@@ -97,7 +97,7 @@ def create_cloned_field(field: ModelField) -> ModelField:
original_type.__name__, __config__=original_type.__config__
)
for f in original_type.__f... | ============================= test session starts ==============================
platform linux -- Python 3.8.3, pytest-5.4.3, py-1.8.1, pluggy-0.13.1
rootdir: /home/user/BugsInPy/temp/projects/fastapi
plugins: cov-2.9.0
collected 1 item
tests/test_filter_pydantic_sub_model.py F [100%]
... | pytest tests/test_filter_pydantic_sub_model.py::test_filter_sub_model | 7cea84b74ca3106a7f861b774e9d215e5228728f | tests/test_filter_pydantic_sub_model.py | |
tiangolo__fastapi-16 | tiangolo/fastapi | diff --git a/fastapi/encoders.py b/fastapi/encoders.py
index 82e3ffa..f5059a7 100644
--- a/fastapi/encoders.py
+++ b/fastapi/encoders.py
@@ -15,17 +15,12 @@ def jsonable_encoder(
custom_encoder: dict = {},
) -> Any:
if isinstance(obj, BaseModel):
- if not obj.Config.json_encoders:
- return ... | diff --git a/tests/test_jsonable_encoder.py b/tests/test_jsonable_encoder.py
index 9108df9d..92eb34a7 100644
--- a/tests/test_jsonable_encoder.py
+++ b/tests/test_jsonable_encoder.py
@@ -1,5 +1,9 @@
+from datetime import datetime, timezone
+from enum import Enum
+
import pytest
from fastapi.encoders import jsonable_e... | ============================= test session starts ==============================
platform linux -- Python 3.8.3, pytest-5.4.3, py-1.8.1, pluggy-0.13.1
rootdir: /home/user/BugsInPy/temp/projects/fastapi
plugins: cov-2.9.0
collected 1 item
tests/test_jsonable_encoder.py F [100%]
... | pytest tests/test_jsonable_encoder.py::test_encode_model_with_config | 92c825be6a7362099400c9c3fe8b01ea13add3dc | tests/test_datetime_custom_encoder.py;tests/test_jsonable_encoder.py |
tiangolo__fastapi-1 | tiangolo/fastapi | diff --git a/fastapi/applications.py b/fastapi/applications.py
index 8270e54..84a1b6d 100644
--- a/fastapi/applications.py
+++ b/fastapi/applications.py
@@ -171,6 +171,8 @@ class FastAPI(Starlette):
response_model_by_alias: bool = True,
response_model_skip_defaults: bool = None,
response_mode... | diff --git a/tests/test_jsonable_encoder.py b/tests/test_jsonable_encoder.py
index f94771aa..adee443a 100644
--- a/tests/test_jsonable_encoder.py
+++ b/tests/test_jsonable_encoder.py
@@ -70,6 +70,12 @@ class ModelWithAlias(BaseModel):
foo: str = Field(..., alias="Foo")
+class ModelWithDefault(BaseModel):
+ ... | ============================= test session starts ==============================
platform linux -- Python 3.8.3, pytest-5.4.3, py-1.8.1, pluggy-0.13.1
rootdir: /home/user/BugsInPy/temp/projects/fastapi
plugins: cov-2.9.0
collected 1 item
tests/test_jsonable_encoder.py F [100%]
... | pytest tests/test_jsonable_encoder.py::test_encode_model_with_default | 766157bfb4e7dfccba09ab398e8ec444d14e947c | tests/test_jsonable_encoder.py |
jakubroztocil__httpie-4 | jakubroztocil/httpie | diff --git a/httpie/models.py b/httpie/models.py
index f6b9dff..af6163f 100644
--- a/httpie/models.py
+++ b/httpie/models.py
@@ -102,8 +102,7 @@ class HTTPRequest(HTTPMessage):
)
headers = dict(self._orig.headers)
-
- if 'Host' not in headers:
+ if 'Host' not in self._orig.headers:
... | ============================= test session starts ==============================
platform linux -- Python 3.7.3, pytest-5.4.2, py-1.8.1, pluggy-0.13.1
rootdir: /home/user/BugsInPy/temp/projects/httpie
plugins: httpbin-1.0.0
collected 1 item
tests/test_regressions.py F [100%... | pytest tests/test_regressions.py::test_Host_header_overwrite | 8c892edd4fe700a7ca5cc733dcb4817831d253e2 | tests/test_regressions.py | |
jakubroztocil__httpie-2 | jakubroztocil/httpie | diff --git a/httpie/client.py b/httpie/client.py
index 1115f4d..482f9dc 100644
--- a/httpie/client.py
+++ b/httpie/client.py
@@ -40,6 +40,7 @@ def get_response(args, config_dir):
"""Send the request and return a `request.Response`."""
requests_session = get_requests_session()
+ requests_session.max_redir... | diff --git a/tests/test_redirects.py b/tests/test_redirects.py
index 35cf9b0..94b1fc0 100644
--- a/tests/test_redirects.py
+++ b/tests/test_redirects.py
@@ -17,6 +17,6 @@ class TestRedirects:
assert HTTP_OK in r
def test_max_redirects(self, httpbin):
- r = http('--max-redirects=2', '--follow', ht... | ============================= test session starts ==============================
platform linux -- Python 3.7.3, pytest-5.4.2, py-1.8.1, pluggy-0.13.1
rootdir: /home/user/BugsInPy/temp/projects/httpie, inifile: pytest.ini
plugins: httpbin-1.0.0
collected 1 item
tests/test_redirects.py F ... | pytest tests/test_redirects.py::TestRedirects::test_max_redirects | 356e0436510fee70b4071fac58be81c0a0a7db59 | tests/test_redirects.py |
jakubroztocil__httpie-3 | jakubroztocil/httpie | diff --git a/httpie/sessions.py b/httpie/sessions.py
index e61a8e3..32254bf 100644
--- a/httpie/sessions.py
+++ b/httpie/sessions.py
@@ -101,6 +101,10 @@ class Session(BaseConfigDict):
"""
for name, value in request_headers.items():
+
+ if value is None:
+ continue # Ignor... | diff --git a/tests/test_sessions.py b/tests/test_sessions.py
index 966d87b..f568377 100644
--- a/tests/test_sessions.py
+++ b/tests/test_sessions.py
@@ -2,6 +2,7 @@
import os
import shutil
import sys
+from tempfile import gettempdir
import pytest
@@ -174,3 +175,14 @@ class TestSession(SessionTestBase):
... | ============================= test session starts ==============================
platform linux -- Python 3.7.3, pytest-5.4.2, py-1.8.1, pluggy-0.13.1
rootdir: /home/user/BugsInPy/temp/projects/httpie, inifile: pytest.ini
plugins: httpbin-1.0.0
collected 1 item
tests/test_sessions.py F ... | pytest tests/test_sessions.py::TestSession::test_download_in_session | 8c33e5e3d31d3cd6476c4d9bc963a4c529f883d2 | tests/test_sessions.py |
jakubroztocil__httpie-5 | jakubroztocil/httpie | diff --git a/httpie/cli.py b/httpie/cli.py
index 22797a5..29a55f6 100644
--- a/httpie/cli.py
+++ b/httpie/cli.py
@@ -36,14 +36,24 @@ class KeyValueType(object):
"""A type used with `argparse`."""
def __init__(self, *separators):
self.separators = separators
+ self.escapes = ['\\\\' + sep for s... | diff --git a/tests/tests.py b/tests/tests.py
index 3302672..ea77d6a 100644
--- a/tests/tests.py
+++ b/tests/tests.py
@@ -76,6 +76,13 @@ class TestItemParsing(BaseTest):
})
self.assertIn('bar@baz', files)
+ def test_escape_longsep(self):
+ headers, data, files = cli.parse_items([
+ ... | ============================= test session starts ==============================
platform linux -- Python 3.7.3, pytest-5.4.2, py-1.8.1, pluggy-0.13.1
rootdir: /home/user/BugsInPy/temp/projects/httpie
plugins: httpbin-1.0.0
collected 1 item
tests/tests.py F [100%... | pytest tests/tests.py::TestItemParsing::test_escape_longsep | 16df8848e81eefac830f407e4b985f42b52970da | tests/tests.py |
jakubroztocil__httpie-1 | jakubroztocil/httpie | diff --git a/httpie/downloads.py b/httpie/downloads.py
index b49e335..972151e 100644
--- a/httpie/downloads.py
+++ b/httpie/downloads.py
@@ -7,6 +7,7 @@ from __future__ import division
import os
import re
import sys
+import errno
import mimetypes
import threading
from time import sleep, time
@@ -135,12 +136,43 @@... | diff --git a/tests/test_downloads.py b/tests/test_downloads.py
index 2d973c3..e09bdde 100644
--- a/tests/test_downloads.py
+++ b/tests/test_downloads.py
@@ -2,6 +2,7 @@ import os
import time
import pytest
+import mock
from requests.structures import CaseInsensitiveDict
from httpie.compat import urlopen
@@ -74,7... | ============================= test session starts ==============================
platform linux -- Python 3.7.3, pytest-3.2.1, py-1.8.1, pluggy-0.4.0
rootdir: /home/user/BugsInPy/temp/projects/httpie, inifile: pytest.ini
plugins: httpbin-1.0.0
collected 11 items
tests/test_downloads.py FFFFFFFFFFF
===================... | pytest tests/test_downloads.py::TestDownloadUtils::test_unique_filename
| 001bda19450ad85c91345eea3cfa3991e1d492ba | tests/test_downloads.py |
keras-team__keras-19 | keras-team/keras | diff --git a/keras/backend/cntk_backend.py b/keras/backend/cntk_backend.py
index 59430400..4c436f6d 100644
--- a/keras/backend/cntk_backend.py
+++ b/keras/backend/cntk_backend.py
@@ -1439,7 +1439,7 @@ def rnn(step_function, inputs, initial_states,
for o, p in zip(new_states, place_holders):
... | diff --git a/tests/keras/layers/recurrent_test.py b/tests/keras/layers/recurrent_test.py
index 8c5814bd8..c0497236c 100644
--- a/tests/keras/layers/recurrent_test.py
+++ b/tests/keras/layers/recurrent_test.py
@@ -499,7 +499,7 @@ def test_minimal_rnn_cell_non_layer_multiple_states():
MinimalRNNCell(16, 8),... | 0
============================= test session starts ==============================
platform linux -- Python 3.7.3, pytest-5.4.3, py-1.8.1, pluggy-0.13.1 -- /opt/conda/envs/a0a5407915338c9fac99516b5bd41c30/bin/python
cachedir: .pytest_cache
rootdir: /home/user/BugsInPy/temp/projects/keras, inifile: pytest.ini
plugins:... | pytest tests/keras/layers/recurrent_test.py::test_inconsistent_output_state_size
pytest tests/keras/layers/recurrent_test.py::test_minimal_rnn_cell_non_layer_multiple_states | f9210387088fe91b5bc8999cf0cb41a0fe9eacf6 | tests/keras/layers/recurrent_test.py |
keras-team__keras-4 | keras-team/keras | diff --git a/keras/optimizers.py b/keras/optimizers.py
index 0dade2fd..89fe2967 100644
--- a/keras/optimizers.py
+++ b/keras/optimizers.py
@@ -703,7 +703,7 @@ class TFOptimizer(Optimizer):
@interfaces.legacy_get_updates_support
def get_updates(self, loss, params):
- grads = self.optimizer.compute_gra... | diff --git a/tests/keras/optimizers_test.py b/tests/keras/optimizers_test.py
index 312033356..c118f4571 100644
--- a/tests/keras/optimizers_test.py
+++ b/tests/keras/optimizers_test.py
@@ -148,5 +148,30 @@ def test_tfoptimizer():
optimizer.from_config(None)
+@pytest.mark.skipif((K.backend() != 'tensorflow'... | ============================= test session starts ==============================
platform linux -- Python 3.7.3, pytest-5.4.3, py-1.8.1, pluggy-0.13.1 -- /opt/conda/envs/ec1239e90de2b89d455019719a3688a0/bin/python
cachedir: .pytest_cache
rootdir: /home/user/BugsInPy/temp/projects/keras, inifile: pytest.ini
plugins: for... | pytest tests/keras/optimizers_test.py::test_tfoptimizer_pass_correct_named_params_to_native_tensorflow_optimizer | b0bfd5201da2bfced84028bcc5bda05bdfd75af7 | tests/keras/optimizers_test.py |
keras-team__keras-13 | keras-team/keras | diff --git a/keras/engine/training_generator.py b/keras/engine/training_generator.py
index 5c5697c5..3c480f22 100644
--- a/keras/engine/training_generator.py
+++ b/keras/engine/training_generator.py
@@ -124,7 +124,8 @@ def fit_generator(model,
elif val_gen:
val_data = validation_data
... | diff --git a/tests/keras/engine/test_training.py b/tests/keras/engine/test_training.py
index 9f767649c..bc0d415aa 100644
--- a/tests/keras/engine/test_training.py
+++ b/tests/keras/engine/test_training.py
@@ -468,6 +468,19 @@ def test_model_methods():
assert trained_batches == list(range(12)) * 5
assert len(v... | ============================= test session starts ==============================
platform linux -- Python 3.7.3, pytest-5.4.3, py-1.8.1, pluggy-0.13.1 -- /opt/conda/envs/30be27653f737e13d505dcd8372bd58d/bin/python
cachedir: .pytest_cache
rootdir: /home/user/BugsInPy/temp/projects/keras, inifile: pytest.ini
plugins: for... | pytest tests/keras/engine/test_training.py::test_model_methods | 2bfd1f2c950df5fc3f40b903c1966f1b0a48bee4 | tests/keras/engine/test_training.py |
keras-team__keras-22 | keras-team/keras | diff --git a/keras/engine/input_layer.py b/keras/engine/input_layer.py
index bc149168..632bf39e 100644
--- a/keras/engine/input_layer.py
+++ b/keras/engine/input_layer.py
@@ -42,6 +42,7 @@ class InputLayer(Layer):
self.trainable = False
self.built = True
self.sparse = sparse
+ self.sup... | diff --git a/tests/keras/layers/core_test.py b/tests/keras/layers/core_test.py
index 1d3ac1967..dd60f5a46 100644
--- a/tests/keras/layers/core_test.py
+++ b/tests/keras/layers/core_test.py
@@ -5,6 +5,7 @@ from numpy.testing import assert_allclose
from keras import backend as K
from keras import layers
from keras.mod... | ============================= test session starts ==============================
platform linux -- Python 3.7.3, pytest-5.4.3, py-1.8.1, pluggy-0.13.1 -- /opt/conda/envs/65bf4093b0a0228acca3fe9ac48a2922/bin/python
cachedir: .pytest_cache
rootdir: /home/user/BugsInPy/temp/projects/keras, inifile: pytest.ini
plugins: htt... | pytest tests/keras/layers/core_test.py::test_sequential_as_downstream_of_masking_layer
| 54386efa549f850dff13f79fc3af67799a4e5d4f | tests/keras/layers/core_test.py |
keras-team__keras-9 | keras-team/keras | diff --git a/docs/autogen.py b/docs/autogen.py
index e3786a92..85acc296 100644
--- a/docs/autogen.py
+++ b/docs/autogen.py
@@ -117,8 +117,8 @@ def count_leading_spaces(s):
def process_list_block(docstring, starting_point, section_end,
leading_spaces, marker):
ending_point = docstring.find(... | diff --git a/tests/test_doc_auto_generation.py b/tests/test_doc_auto_generation.py
index 31747ccaa..6cdb23f08 100644
--- a/tests/test_doc_auto_generation.py
+++ b/tests/test_doc_auto_generation.py
@@ -326,9 +326,33 @@ y = layer(x)
'''}
-def test_doc_lists():
- docstring = autogen.process_docstring(test_doc1['do... | ============================= test session starts ==============================
platform linux -- Python 3.7.3, pytest-5.4.3, py-1.8.1, pluggy-0.13.1 -- /opt/conda/envs/ec1239e90de2b89d455019719a3688a0/bin/python
cachedir: .pytest_cache
rootdir: /home/user/BugsInPy/temp/projects/keras, inifile: pytest.ini
plugins: for... | pytest tests/test_doc_auto_generation.py::test_doc_lists[docs_descriptor1] | 0cd3b07eb5de1aaaad84d1ff7f7c2ed7dab4b23c | tests/test_doc_auto_generation.py |
keras-team__keras-7 | keras-team/keras | diff --git a/keras/wrappers/scikit_learn.py b/keras/wrappers/scikit_learn.py
index 6ebf6fc8..83c3e3c4 100644
--- a/keras/wrappers/scikit_learn.py
+++ b/keras/wrappers/scikit_learn.py
@@ -320,7 +320,7 @@ class KerasRegressor(BaseWrapper):
Predictions.
"""
kwargs = self.filter_sk_params... | diff --git a/tests/keras/wrappers/scikit_learn_test.py b/tests/keras/wrappers/scikit_learn_test.py
index e64aebef2..8b180ff10 100644
--- a/tests/keras/wrappers/scikit_learn_test.py
+++ b/tests/keras/wrappers/scikit_learn_test.py
@@ -167,6 +167,24 @@ def assert_regression_works(reg):
assert preds.shape == (num_test... | ============================= test session starts ==============================
platform linux -- Python 3.7.3, pytest-5.4.3, py-1.8.1, pluggy-0.13.1 -- /opt/conda/envs/ec1239e90de2b89d455019719a3688a0/bin/python
cachedir: .pytest_cache
rootdir: /home/user/BugsInPy/temp/projects/keras, inifile: pytest.ini
plugins: for... | pytest tests/keras/wrappers/scikit_learn_test.py::test_regression_predict_shape_correct_num_test_1 | 26b620fb37c885d60183f83abc744f43775ce75a | tests/keras/wrappers/scikit_learn_test.py |
keras-team__keras-34 | keras-team/keras | diff --git a/keras/engine/training.py b/keras/engine/training.py
index ea641c3a..44d7587b 100644
--- a/keras/engine/training.py
+++ b/keras/engine/training.py
@@ -2162,7 +2162,10 @@ class Model(Container):
val_enqueuer.start(workers=workers, max_queue_size=max_queue_size)
... | diff --git a/tests/test_multiprocessing.py b/tests/test_multiprocessing.py
index be7a59ac1..ab637e1c8 100644
--- a/tests/test_multiprocessing.py
+++ b/tests/test_multiprocessing.py
@@ -6,12 +6,21 @@ import numpy as np
from keras.models import Sequential
from keras.layers.core import Dense
from keras.utils.test_utils... | ============================= test session starts ==============================
platform linux -- Python 3.7.3, pytest-5.4.3, py-1.8.1, pluggy-0.13.1 -- /opt/conda/envs/50ed758a536fff6a0703bf56934e9ce8/bin/python
cachedir: .pytest_cache
rootdir: /home/user/BugsInPy/temp/projects/keras, inifile: pytest.ini
plugins: for... | pytest tests/test_multiprocessing.py::test_multiprocessing_training | 7ef5244a2f1f7f7b76e3c804b82cbb20cdf4d139 | tests/test_multiprocessing.py |
keras-team__keras-28 | keras-team/keras | diff --git a/keras/preprocessing/sequence.py b/keras/preprocessing/sequence.py
index 03906c04..7bfe97a9 100644
--- a/keras/preprocessing/sequence.py
+++ b/keras/preprocessing/sequence.py
@@ -326,9 +326,15 @@ class TimeseriesGenerator(Sequence):
self.reverse = reverse
self.batch_size = batch_size
+ ... | diff --git a/tests/keras/preprocessing/sequence_test.py b/tests/keras/preprocessing/sequence_test.py
index b219baab6..c80a6536e 100644
--- a/tests/keras/preprocessing/sequence_test.py
+++ b/tests/keras/preprocessing/sequence_test.py
@@ -1,5 +1,7 @@
+from math import ceil
+
import numpy as np
-from numpy.testing import... | 0
============================= test session starts ==============================
platform linux -- Python 3.7.3, pytest-5.4.3, py-1.8.1, pluggy-0.13.1 -- /opt/conda/envs/dbe8313bd2bb0305ed3f6515aa4d20dc/bin/python
cachedir: .pytest_cache
rootdir: /home/user/BugsInPy/temp/projects/keras, inifile: pytest.ini
plugins:... | pytest tests/keras/preprocessing/sequence_test.py::test_TimeSeriesGenerator_doesnt_miss_any_sample
pytest tests/keras/preprocessing/sequence_test.py::test_TimeseriesGenerator | 6171b3656ebd9b6038f709ba83f7475de284ba4e | tests/keras/preprocessing/sequence_test.py |
keras-team__keras-12 | keras-team/keras | 0
============================= test session starts ==============================
platform linux -- Python 3.7.3, pytest-5.4.3, py-1.8.1, pluggy-0.13.1 -- /opt/conda/envs/ec1239e90de2b89d455019719a3688a0/bin/python
cachedir: .pytest_cache
rootdir: /home/user/BugsInPy/temp/projects/keras, inifile: pytest.ini
plugins:... | pytest tests/keras/metrics_test.py::test_sparse_categorical_accuracy_correctness[shape1]
pytest tests/keras/metrics_test.py::test_sparse_categorical_accuracy_correctness[shape2] | 6dff721a3a8755356b2e89d02ef63ad8ab38ec95 | tests/keras/metrics_test.py | ||
keras-team__keras-27 | keras-team/keras | diff --git a/keras/layers/wrappers.py b/keras/layers/wrappers.py
index c4afab1b..3bf489d1 100644
--- a/keras/layers/wrappers.py
+++ b/keras/layers/wrappers.py
@@ -487,12 +487,24 @@ class Bidirectional(Wrapper):
return self.forward_layer.updates + self.backward_layer.updates
return []
+ def ge... | diff --git a/tests/keras/layers/wrappers_test.py b/tests/keras/layers/wrappers_test.py
index 4407625b7..17f7b1e97 100644
--- a/tests/keras/layers/wrappers_test.py
+++ b/tests/keras/layers/wrappers_test.py
@@ -556,5 +556,39 @@ def test_Bidirectional_trainable():
assert len(layer.trainable_weights) == 6
+@keras_... | 0
============================= test session starts ==============================
platform linux -- Python 3.7.3, pytest-5.4.3, py-1.8.1, pluggy-0.13.1 -- /opt/conda/envs/ed5a9063c4bedeafb0671856da27ae76/bin/python
cachedir: .pytest_cache
rootdir: /home/user/BugsInPy/temp/projects/keras, inifile: pytest.ini
plugins:... | pytest tests/keras/layers/wrappers_test.py::test_Bidirectional_updates
pytest tests/keras/layers/wrappers_test.py::test_Bidirectional_losses | 49f5b931410bc2e56378f20a15e8ac919e0efb88 | tests/keras/layers/wrappers_test.py |
keras-team__keras-41 | keras-team/keras | diff --git a/keras/utils/data_utils.py b/keras/utils/data_utils.py
index ce1a60ac..bc0d87ce 100644
--- a/keras/utils/data_utils.py
+++ b/keras/utils/data_utils.py
@@ -11,6 +11,7 @@ import sys
import tarfile
import threading
import time
+import traceback
import zipfile
from abc import abstractmethod
from multiproc... | diff --git a/tests/keras/utils/data_utils_test.py b/tests/keras/utils/data_utils_test.py
index 753330e41..f83ea6ec7 100644
--- a/tests/keras/utils/data_utils_test.py
+++ b/tests/keras/utils/data_utils_test.py
@@ -182,7 +182,7 @@ def test_generator_enqueuer_fail_threads():
FaultSequence()), use_multiprocessing=... | ============================= test session starts ==============================
platform linux -- Python 3.7.3, pytest-5.4.3, py-1.8.1, pluggy-0.13.1 -- /opt/conda/envs/66f557d45597d0371c1c7f7e137dee51/bin/python
cachedir: .pytest_cache
rootdir: /home/user/BugsInPy/temp/projects/keras, inifile: pytest.ini
plugins: htt... | pytest tests/keras/utils/data_utils_test.py::test_generator_enqueuer_fail_threads | a27b4a51f4880ad3a7669531b667c1ef44b173ef | tests/keras/utils/data_utils_test.py |
keras-team__keras-30 | keras-team/keras | diff --git a/keras/engine/training.py b/keras/engine/training.py
index c6691017..78be752b 100644
--- a/keras/engine/training.py
+++ b/keras/engine/training.py
@@ -2212,7 +2212,11 @@ class Model(Container):
str(generator_output))
# build batch logs
... | diff --git a/tests/keras/engine/test_training.py b/tests/keras/engine/test_training.py
index 6854ffaec..7772883e4 100644
--- a/tests/keras/engine/test_training.py
+++ b/tests/keras/engine/test_training.py
@@ -867,6 +867,20 @@ def test_model_with_external_loss():
out = model.fit(None, None, epochs=1, batch_... | ============================= test session starts ==============================
platform linux -- Python 3.7.3, pytest-5.4.3, py-1.8.1, pluggy-0.13.1 -- /opt/conda/envs/91f454ccae25459b57a9f2959f457e5b/bin/python
cachedir: .pytest_cache
rootdir: /home/user/BugsInPy/temp/projects/keras, inifile: pytest.ini
plugins: for... | pytest tests/keras/engine/test_training.py::test_model_with_external_loss | c08ef613af27da896cee168daeee5c6fad1980b6 | tests/keras/engine/test_training.py |
keras-team__keras-33 | keras-team/keras | diff --git a/keras/preprocessing/text.py b/keras/preprocessing/text.py
index 8264c1a6..6bd17435 100644
--- a/keras/preprocessing/text.py
+++ b/keras/preprocessing/text.py
@@ -38,12 +38,21 @@ def text_to_word_sequence(text,
if lower:
text = text.lower()
- if sys.version_info < (3,) and isinstance(text... | diff --git a/tests/keras/preprocessing/text_test.py b/tests/keras/preprocessing/text_test.py
index 8d5ffb2f7..65fbdbb37 100644
--- a/tests/keras/preprocessing/text_test.py
+++ b/tests/keras/preprocessing/text_test.py
@@ -73,11 +73,21 @@ def test_text_to_word_sequence():
assert text_to_word_sequence(text) == ['hell... | 0
============================= test session starts ==============================
platform linux -- Python 3.7.3, pytest-5.4.3, py-1.8.1, pluggy-0.13.1 -- /opt/conda/envs/46684df2d5635c359f1cbc5428790f06/bin/python
cachedir: .pytest_cache
rootdir: /home/user/BugsInPy/temp/projects/keras, inifile: pytest.ini
plugins:... | pytest tests/keras/preprocessing/text_test.py::test_text_to_word_sequence_multichar_split
pytest tests/keras/preprocessing/text_test.py::test_text_to_word_sequence_unicode_multichar_split | 1c9a49781da2101507db23e2014e4e5d16bd2e52 | tests/keras/preprocessing/text_test.py |
keras-team__keras-45 | keras-team/keras | diff --git a/keras/layers/recurrent.py b/keras/layers/recurrent.py
index ec9fa871..46eb08cd 100644
--- a/keras/layers/recurrent.py
+++ b/keras/layers/recurrent.py
@@ -1803,10 +1803,15 @@ class LSTMCell(Layer):
inputs_f = inputs
inputs_c = inputs
inputs_o = inputs
- ... | diff --git a/tests/keras/layers/recurrent_test.py b/tests/keras/layers/recurrent_test.py
index 19d318a06..20f0065f3 100644
--- a/tests/keras/layers/recurrent_test.py
+++ b/tests/keras/layers/recurrent_test.py
@@ -183,6 +183,12 @@ def test_implementation_mode(layer_class):
'dropout': 0.1,
... | ============================= test session starts ==============================
platform linux -- Python 3.7.3, pytest-5.4.2, py-1.8.1, pluggy-0.13.1 -- /opt/conda/envs/11a30c7184b1d2bc0687492d607ca913/bin/python
cachedir: .pytest_cache
rootdir: /home/user/BugsInPy/temp/projects/keras, inifile: pytest.ini
plugins: htt... | pytest tests/keras/layers/recurrent_test.py::test_implementation_mode[LSTM]
| d368dc870bfd8fdd4ca0ff82bd5b61aa549291c5 | tests/keras/layers/recurrent_test.py |
keras-team__keras-25 | keras-team/keras | diff --git a/keras/applications/imagenet_utils.py b/keras/applications/imagenet_utils.py
index cfdd1098..d6a3c23d 100644
--- a/keras/applications/imagenet_utils.py
+++ b/keras/applications/imagenet_utils.py
@@ -38,6 +38,8 @@ def _preprocess_numpy_input(x, data_format, mode):
# Returns
Preprocessed Numpy a... | diff --git a/tests/keras/applications/imagenet_utils_test.py b/tests/keras/applications/imagenet_utils_test.py
index 48316a06d..85674b0b9 100644
--- a/tests/keras/applications/imagenet_utils_test.py
+++ b/tests/keras/applications/imagenet_utils_test.py
@@ -8,23 +8,35 @@ from keras.layers import Input, Lambda
def t... | ============================= test session starts ==============================
platform linux -- Python 3.7.3, pytest-5.4.3, py-1.8.1, pluggy-0.13.1 -- /opt/conda/envs/70d512a17e79e7668f22d8292a6a3870/bin/python
cachedir: .pytest_cache
rootdir: /home/user/BugsInPy/temp/projects/keras, inifile: pytest.ini
plugins: htt... | pytest tests/keras/applications/imagenet_utils_test.py::test_preprocess_input | b470a595f7278acf5e7e47521edf25d3c4f479f1 | tests/keras/applications/imagenet_utils_test.py |
keras-team__keras-6 | keras-team/keras | diff --git a/keras/engine/training_utils.py b/keras/engine/training_utils.py
index 68f14ac0..e8116397 100644
--- a/keras/engine/training_utils.py
+++ b/keras/engine/training_utils.py
@@ -410,7 +410,7 @@ def weighted_masked_objective(fn):
score_array *= mask
# the loss per batch should be prop... | diff --git a/tests/test_loss_masking.py b/tests/test_loss_masking.py
index 45b23b1fb..323443997 100644
--- a/tests/test_loss_masking.py
+++ b/tests/test_loss_masking.py
@@ -8,20 +8,32 @@ from keras import losses
from keras import backend as K
+def create_masking_model():
+ model = Sequential()
+ model.add(Ma... | ============================= test session starts ==============================
platform linux -- Python 3.7.3, pytest-5.4.3, py-1.8.1, pluggy-0.13.1 -- /opt/conda/envs/ec1239e90de2b89d455019719a3688a0/bin/python
cachedir: .pytest_cache
rootdir: /home/user/BugsInPy/temp/projects/keras, inifile: pytest.ini
plugins: for... | pytest tests/test_loss_masking.py::test_masking_is_all_zeros | 88af7d0c97497b5c3a198ee9416b2accfbc72c36 | tests/test_loss_masking.py |
keras-team__keras-37 | keras-team/keras | diff --git a/keras/layers/recurrent.py b/keras/layers/recurrent.py
index f31286db..81c367f9 100644
--- a/keras/layers/recurrent.py
+++ b/keras/layers/recurrent.py
@@ -518,12 +518,14 @@ class RNN(Layer):
self._num_constants = len(constants)
additional_specs += self.constants_spec
# at ... | diff --git a/tests/keras/layers/wrappers_test.py b/tests/keras/layers/wrappers_test.py
index 65272d1af..c471a49ed 100644
--- a/tests/keras/layers/wrappers_test.py
+++ b/tests/keras/layers/wrappers_test.py
@@ -325,19 +325,22 @@ def test_Bidirectional_state_reuse():
timesteps = 3
units = 3
- inputs = Input... | ============================= test session starts ==============================
platform linux -- Python 3.7.3, pytest-5.4.3, py-1.8.1, pluggy-0.13.1 -- /opt/conda/envs/a5eabc0de5ef7a4304b455cf663ce107/bin/python
cachedir: .pytest_cache
rootdir: /home/user/BugsInPy/temp/projects/keras, inifile: pytest.ini
plugins: for... | pytest tests/keras/layers/wrappers_test.py::test_Bidirectional_state_reuse | 81f6b3aa5b2b6215a533180e848a3b4dff851d03 | tests/keras/layers/wrappers_test.py |
keras-team__keras-40 | keras-team/keras | diff --git a/keras/layers/recurrent.py b/keras/layers/recurrent.py
index a94d0623..4b371ff2 100644
--- a/keras/layers/recurrent.py
+++ b/keras/layers/recurrent.py
@@ -395,9 +395,10 @@ class RNN(Layer):
input_shape = input_shape[0]
if hasattr(self.cell.state_size, '__len__'):
- output_... | diff --git a/tests/keras/layers/recurrent_test.py b/tests/keras/layers/recurrent_test.py
index 074219c16..dd784c234 100644
--- a/tests/keras/layers/recurrent_test.py
+++ b/tests/keras/layers/recurrent_test.py
@@ -596,6 +596,20 @@ def test_stacked_rnn_attributes():
assert layer.get_losses_for(x) == [y]
+@keras_... | ============================= test session starts ==============================
platform linux -- Python 3.7.3, pytest-5.4.3, py-1.8.1, pluggy-0.13.1 -- /opt/conda/envs/66f557d45597d0371c1c7f7e137dee51/bin/python
cachedir: .pytest_cache
rootdir: /home/user/BugsInPy/temp/projects/keras, inifile: pytest.ini
plugins: htt... | pytest tests/keras/layers/recurrent_test.py::test_stacked_rnn_compute_output_shape | 871007dbb0e6211459b9d16244cc3c9683459df7 | tests/keras/layers/recurrent_test.py |
keras-team__keras-31 | keras-team/keras | diff --git a/keras/backend/tensorflow_backend.py b/keras/backend/tensorflow_backend.py
index f145d43d..0e313bc5 100644
--- a/keras/backend/tensorflow_backend.py
+++ b/keras/backend/tensorflow_backend.py
@@ -3942,8 +3942,8 @@ def ctc_batch_cost(y_true, y_pred, input_length, label_length):
Tensor with shape (sam... | diff --git a/tests/keras/backend/backend_test.py b/tests/keras/backend/backend_test.py
index 25003d442..037628cff 100644
--- a/tests/keras/backend/backend_test.py
+++ b/tests/keras/backend/backend_test.py
@@ -1475,6 +1475,32 @@ class TestBackend(object):
res = K.eval(K.ctc_batch_cost(k_labels, k_inputs, k_inpu... | ============================= test session starts ==============================
platform linux -- Python 3.7.3, pytest-5.4.3, py-1.8.1, pluggy-0.13.1 -- /opt/conda/envs/7ba78bf48f247a0c342bdbb3158dc533/bin/python
cachedir: .pytest_cache
rootdir: /home/user/BugsInPy/temp/projects/keras, inifile: pytest.ini
plugins: for... | pytest tests/keras/backend/backend_test.py::TestBackend::test_ctc | ced81968b0e9d8b1389e6580721ac60d9cf3ca60 | tests/keras/backend/backend_test.py |
keras-team__keras-2 | keras-team/keras | diff --git a/keras/backend/numpy_backend.py b/keras/backend/numpy_backend.py
index fe23567a..1e061955 100644
--- a/keras/backend/numpy_backend.py
+++ b/keras/backend/numpy_backend.py
@@ -316,6 +316,12 @@ def l2_normalize(x, axis=-1):
return x / np.sqrt(y)
+def in_top_k(predictions, targets, k):
+ top_k = np... | diff --git a/tests/keras/backend/backend_test.py b/tests/keras/backend/backend_test.py
index 62e0a4f9e..da433ca34 100644
--- a/tests/keras/backend/backend_test.py
+++ b/tests/keras/backend/backend_test.py
@@ -1156,6 +1156,7 @@ class TestBackend(object):
check_single_tensor_operation('l2_normalize', (4, 3), WIT... | ============================= test session starts ==============================
platform linux -- Python 3.7.3, pytest-5.4.3, py-1.8.1, pluggy-0.13.1 -- /opt/conda/envs/ec1239e90de2b89d455019719a3688a0/bin/python
cachedir: .pytest_cache
rootdir: /home/user/BugsInPy/temp/projects/keras, inifile: pytest.ini
plugins: for... | pytest tests/keras/backend/backend_test.py::TestBackend::test_in_top_k | 2f55055a9f053b35fa721d3eb75dd07ea5a5f1e3 | tests/keras/backend/backend_test.py |
keras-team__keras-21 | keras-team/keras | diff --git a/keras/callbacks.py b/keras/callbacks.py
index 067169f3..04826921 100644
--- a/keras/callbacks.py
+++ b/keras/callbacks.py
@@ -477,6 +477,10 @@ class EarlyStopping(Callback):
baseline: Baseline value for the monitored quantity to reach.
Training will stop if the model doesn't show impr... | diff --git a/tests/keras/test_callbacks.py b/tests/keras/test_callbacks.py
index 1eaba26fc..b3c98abc4 100644
--- a/tests/keras/test_callbacks.py
+++ b/tests/keras/test_callbacks.py
@@ -267,6 +267,12 @@ def test_EarlyStopping_patience():
def __init__(self):
self.stop_training = False
+ def... | ============================= test session starts ==============================
platform linux -- Python 3.7.3, pytest-5.4.3, py-1.8.1, pluggy-0.13.1 -- /opt/conda/envs/65bf4093b0a0228acca3fe9ac48a2922/bin/python
cachedir: .pytest_cache
rootdir: /home/user/BugsInPy/temp/projects/keras, inifile: pytest.ini
plugins: htt... | pytest tests/keras/test_callbacks.py::test_EarlyStopping_final_weights_when_restoring_model_weights | c7b7328cc99fd5d7c298e57c6020043451d89a61 | tests/keras/test_callbacks.py |
keras-team__keras-3 | keras-team/keras | diff --git a/keras/models.py b/keras/models.py
index a03b09ab..03c487dd 100644
--- a/keras/models.py
+++ b/keras/models.py
@@ -137,9 +137,12 @@ def _clone_functional_model(model, input_tensors=None):
kwargs['mask'] = computed_mask
output_tensors = to_list(
... | diff --git a/tests/keras/test_sequential_model.py b/tests/keras/test_sequential_model.py
index d848734f6..13160734c 100644
--- a/tests/keras/test_sequential_model.py
+++ b/tests/keras/test_sequential_model.py
@@ -339,6 +339,33 @@ def test_clone_functional_model():
new_model.train_on_batch(None, val_out)
+def t... | ============================= test session starts ==============================
platform linux -- Python 3.7.3, pytest-5.4.3, py-1.8.1, pluggy-0.13.1 -- /opt/conda/envs/ec1239e90de2b89d455019719a3688a0/bin/python
cachedir: .pytest_cache
rootdir: /home/user/BugsInPy/temp/projects/keras, inifile: pytest.ini
plugins: for... | pytest tests/keras/test_sequential_model.py::test_clone_functional_model_with_multi_outputs
| c0d1709cbae3d05efc6dd224230012bc120be8e5 | tests/keras/test_sequential_model.py |
keras-team__keras-26 | keras-team/keras | diff --git a/keras/backend/tensorflow_backend.py b/keras/backend/tensorflow_backend.py
index cd57dfbe..117c72e5 100644
--- a/keras/backend/tensorflow_backend.py
+++ b/keras/backend/tensorflow_backend.py
@@ -2871,7 +2871,10 @@ def rnn(step_function, inputs, initial_states,
tiled_mask_t = tf.tile(mask_t,... | diff --git a/tests/keras/backend/backend_test.py b/tests/keras/backend/backend_test.py
index 6cd72e611..2504522be 100644
--- a/tests/keras/backend/backend_test.py
+++ b/tests/keras/backend/backend_test.py
@@ -599,6 +599,82 @@ class TestBackend(object):
assert_allclose(outputs_list[i - 1], outputs_list[... | ============================= test session starts ==============================
platform linux -- Python 3.7.3, pytest-5.4.3, py-1.8.1, pluggy-0.13.1 -- /opt/conda/envs/70d512a17e79e7668f22d8292a6a3870/bin/python
cachedir: .pytest_cache
rootdir: /home/user/BugsInPy/temp/projects/keras, inifile: pytest.ini
plugins: htt... | pytest tests/keras/backend/backend_test.py::TestBackend::test_rnn_additional_states | 87417470c8168772559be0531e297120c569a422 | tests/keras/backend/backend_test.py |
keras-team__keras-10 | keras-team/keras | diff --git a/keras/engine/training_utils.py b/keras/engine/training_utils.py
index e8116397..d1e3f9ba 100644
--- a/keras/engine/training_utils.py
+++ b/keras/engine/training_utils.py
@@ -432,7 +432,8 @@ def standardize_weights(y,
"""Performs sample weight validation and standardization.
Everything gets norm... | diff --git a/tests/keras/engine/test_training.py b/tests/keras/engine/test_training.py
index a94994139..1d7df6747 100644
--- a/tests/keras/engine/test_training.py
+++ b/tests/keras/engine/test_training.py
@@ -1575,5 +1575,25 @@ def test_dynamic_set_inputs():
assert preds4.shape == (1, 19)
+def test_sample_weig... | ============================= test session starts ==============================
platform linux -- Python 3.7.3, pytest-5.4.3, py-1.8.1, pluggy-0.13.1 -- /opt/conda/envs/ec1239e90de2b89d455019719a3688a0/bin/python
cachedir: .pytest_cache
rootdir: /home/user/BugsInPy/temp/projects/keras, inifile: pytest.ini
plugins: for... | pytest tests/keras/engine/test_training.py::test_sample_weights | 8f41e41eda6e8ea96403cae5798a5a89c8bb5605 | tests/keras/engine/test_training.py |
keras-team__keras-29 | keras-team/keras | diff --git a/keras/engine/training.py b/keras/engine/training.py
index 78be752b..e78477e4 100644
--- a/keras/engine/training.py
+++ b/keras/engine/training.py
@@ -853,6 +853,7 @@ class Model(Container):
nested_weighted_metrics = _collect_metrics(weighted_metrics, self.output_names)
self.metrics_update... | diff --git a/tests/keras/metrics_test.py b/tests/keras/metrics_test.py
index 2e40daeda..39ad1cdbc 100644
--- a/tests/keras/metrics_test.py
+++ b/tests/keras/metrics_test.py
@@ -107,7 +107,8 @@ def test_sparse_top_k_categorical_accuracy():
@keras_test
-def test_stateful_metrics():
+@pytest.mark.parametrize('metrics... | ============================= test session starts ==============================
platform linux -- Python 3.7.3, pytest-5.4.3, py-1.8.1, pluggy-0.13.1 -- /opt/conda/envs/6653c8d2bfe512b8ea59642a1bdc72a4/bin/python
cachedir: .pytest_cache
rootdir: /home/user/BugsInPy/temp/projects/keras, inifile: pytest.ini
plugins: for... | pytest tests/keras/metrics_test.py::test_stateful_metrics[dict] | a341c014412cbfc86a9dd9816ae228e398dff3a2 | tests/keras/metrics_test.py |
keras-team__keras-23 | keras-team/keras | diff --git a/keras/engine/sequential.py b/keras/engine/sequential.py
index 37d19d0b..6def870b 100644
--- a/keras/engine/sequential.py
+++ b/keras/engine/sequential.py
@@ -149,8 +149,6 @@ class Sequential(Model):
first_layer = layer.layers[0]
while isinstance(first_layer, (Model... | diff --git a/tests/keras/test_sequential_model.py b/tests/keras/test_sequential_model.py
index c334aa3fc..a3b90b8b3 100644
--- a/tests/keras/test_sequential_model.py
+++ b/tests/keras/test_sequential_model.py
@@ -422,5 +422,45 @@ def test_sequential_deferred_build():
assert len(new_model.weights) == 4
+@keras_... | ============================= test session starts ==============================
platform linux -- Python 3.7.3, pytest-5.4.3, py-1.8.1, pluggy-0.13.1 -- /opt/conda/envs/65bf4093b0a0228acca3fe9ac48a2922/bin/python
cachedir: .pytest_cache
rootdir: /home/user/BugsInPy/temp/projects/keras, inifile: pytest.ini
plugins: htt... | pytest tests/keras/test_sequential_model.py::test_nested_sequential_deferred_build | 3dcd9c767ce6875fc8b69c74971ac8a552e23131 | tests/keras/test_sequential_model.py |
keras-team__keras-36 | keras-team/keras | diff --git a/keras/backend/tensorflow_backend.py b/keras/backend/tensorflow_backend.py
index 8fdb9aa8..27f8afed 100644
--- a/keras/backend/tensorflow_backend.py
+++ b/keras/backend/tensorflow_backend.py
@@ -3416,10 +3416,10 @@ def separable_conv1d(x, depthwise_kernel, pointwise_kernel, strides=1,
padding = _prepro... | diff --git a/tests/keras/layers/convolutional_test.py b/tests/keras/layers/convolutional_test.py
index 4bb3fe584..296d9a15b 100644
--- a/tests/keras/layers/convolutional_test.py
+++ b/tests/keras/layers/convolutional_test.py
@@ -238,21 +238,22 @@ def test_separable_conv_1d():
num_step = 9
for padding in _co... | ============================= test session starts ==============================
platform linux -- Python 3.7.3, pytest-5.4.3, py-1.8.1, pluggy-0.13.1 -- /opt/conda/envs/91ea65510c707c6c7c6032539f2e3ff2/bin/python
cachedir: .pytest_cache
rootdir: /home/user/BugsInPy/temp/projects/keras, inifile: pytest.ini
plugins: for... | pytest tests/keras/layers/convolutional_test.py::test_separable_conv_1d | 85f011df5a5c0fcf1f01b39eca338eb6b7e58401 | tests/keras/layers/convolutional_test.py |
keras-team__keras-39 | keras-team/keras | diff --git a/keras/utils/generic_utils.py b/keras/utils/generic_utils.py
index 667e93f9..56e329e5 100644
--- a/keras/utils/generic_utils.py
+++ b/keras/utils/generic_utils.py
@@ -327,7 +327,7 @@ class Progbar(object):
info = ' - %.0fs' % (now - self.start)
if self.verbose == 1:
if (not fo... | diff --git a/tests/keras/utils/generic_utils_test.py b/tests/keras/utils/generic_utils_test.py
index 9aa2a7cb9..408b9c30e 100644
--- a/tests/keras/utils/generic_utils_test.py
+++ b/tests/keras/utils/generic_utils_test.py
@@ -16,8 +16,12 @@ from keras import regularizers
def test_progbar():
n = 2
input_arr = ... | ============================= test session starts ==============================
platform linux -- Python 3.7.3, pytest-5.4.3, py-1.8.1, pluggy-0.13.1 -- /opt/conda/envs/66f557d45597d0371c1c7f7e137dee51/bin/python
cachedir: .pytest_cache
rootdir: /home/user/BugsInPy/temp/projects/keras, inifile: pytest.ini
plugins: htt... | pytest tests/keras/utils/generic_utils_test.py::test_progbar | 3a431ea52d090fb3ef8a1e0e5d7f796d9a42e097 | tests/keras/utils/generic_utils_test.py |
keras-team__keras-35 | keras-team/keras | diff --git a/keras/preprocessing/image.py b/keras/preprocessing/image.py
index 97d97792..838d7bc3 100644
--- a/keras/preprocessing/image.py
+++ b/keras/preprocessing/image.py
@@ -580,8 +580,6 @@ class ImageDataGenerator(object):
# Returns
The inputs, normalized.
"""
- if self.prepr... | diff --git a/tests/keras/preprocessing/image_test.py b/tests/keras/preprocessing/image_test.py
index 0c81cb582..bdc06ae1d 100644
--- a/tests/keras/preprocessing/image_test.py
+++ b/tests/keras/preprocessing/image_test.py
@@ -235,6 +235,29 @@ class TestImage(object):
with pytest.raises(ValueError):
... | ============================= test session starts ==============================
platform linux -- Python 3.7.3, pytest-5.4.3, py-1.8.1, pluggy-0.13.1 -- /opt/conda/envs/30e8368b55e669bfee75fe8c0764efb3/bin/python
cachedir: .pytest_cache
rootdir: /home/user/BugsInPy/temp/projects/keras, inifile: pytest.ini
plugins: for... | pytest tests/keras/preprocessing/image_test.py::TestImage::test_directory_iterator | 06eaeebecfb73c23bfd531013ca172ee3bf5069c | tests/keras/preprocessing/image_test.py |
keras-team__keras-8 | keras-team/keras | diff --git a/keras/engine/network.py b/keras/engine/network.py
index 7d36df7a..e5daf0bb 100644
--- a/keras/engine/network.py
+++ b/keras/engine/network.py
@@ -958,12 +958,28 @@ class Network(Layer):
unprocessed_nodes = {}
def add_unprocessed_node(layer, node_data):
+ """Add node to layer ... | diff --git a/tests/keras/engine/test_topology.py b/tests/keras/engine/test_topology.py
index 9f5c2eebf..9813adbce 100644
--- a/tests/keras/engine/test_topology.py
+++ b/tests/keras/engine/test_topology.py
@@ -760,6 +760,43 @@ def test_layer_sharing_at_heterogeneous_depth_with_concat():
np.testing.assert_allclose(o... | ============================= test session starts ==============================
platform linux -- Python 3.7.3, pytest-5.4.3, py-1.8.1, pluggy-0.13.1 -- /opt/conda/envs/ec1239e90de2b89d455019719a3688a0/bin/python
cachedir: .pytest_cache
rootdir: /home/user/BugsInPy/temp/projects/keras, inifile: pytest.ini
plugins: for... | pytest tests/keras/engine/test_topology.py::test_layer_sharing_at_heterogeneous_depth_order | 87540a2a2f42e00c4a2ca7ca35d19f96e62e6cb0 | tests/keras/engine/test_topology.py |
keras-team__keras-17 | keras-team/keras | diff --git a/keras/metrics.py b/keras/metrics.py
index 3d5df23b..7c89702e 100644
--- a/keras/metrics.py
+++ b/keras/metrics.py
@@ -34,7 +34,8 @@ def categorical_accuracy(y_true, y_pred):
def sparse_categorical_accuracy(y_true, y_pred):
- return K.cast(K.equal(K.max(y_true, axis=-1),
+ # flatten y_true in cas... | diff --git a/tests/keras/metrics_test.py b/tests/keras/metrics_test.py
index 07ac08460..f4ab14a62 100644
--- a/tests/keras/metrics_test.py
+++ b/tests/keras/metrics_test.py
@@ -47,6 +47,18 @@ def test_sparse_metrics():
assert K.eval(metric(y_a, y_b)).shape == (6,)
+@keras_test
+def test_sparse_categorical_... | ============================= test session starts ==============================
platform linux -- Python 3.7.3, pytest-5.4.3, py-1.8.1, pluggy-0.13.1 -- /opt/conda/envs/a0a5407915338c9fac99516b5bd41c30/bin/python
cachedir: .pytest_cache
rootdir: /home/user/BugsInPy/temp/projects/keras, inifile: pytest.ini
plugins: xdi... | pytest tests/keras/metrics_test.py::test_sparse_categorical_accuracy_correctness | c913b6da92f6ab9a3f4c897caa4085e782a14680 | tests/keras/metrics_test.py |
keras-team__keras-38 | keras-team/keras | diff --git a/keras/layers/recurrent.py b/keras/layers/recurrent.py
index 59046d78..89983d8e 100644
--- a/keras/layers/recurrent.py
+++ b/keras/layers/recurrent.py
@@ -106,7 +106,7 @@ class StackedRNNCells(Layer):
output_dim = cell.state_size[0]
else:
output_dim = cell.stat... | diff --git a/tests/keras/layers/recurrent_test.py b/tests/keras/layers/recurrent_test.py
index 820935b7c..4fd407ff9 100644
--- a/tests/keras/layers/recurrent_test.py
+++ b/tests/keras/layers/recurrent_test.py
@@ -517,6 +517,9 @@ def test_minimal_rnn_cell_layer():
super(MinimalRNNCell, self).__init__(**kwar... | ============================= test session starts ==============================
platform linux -- Python 3.7.3, pytest-5.4.3, py-1.8.1, pluggy-0.13.1 -- /opt/conda/envs/66f557d45597d0371c1c7f7e137dee51/bin/python
cachedir: .pytest_cache
rootdir: /home/user/BugsInPy/temp/projects/keras, inifile: pytest.ini
plugins: htt... | pytest tests/keras/layers/recurrent_test.py::test_minimal_rnn_cell_layer | 53ec990d54130dd0a457dd235c93d39de32d571d | tests/keras/layers/recurrent_test.py |
keras-team__keras-15 | keras-team/keras | diff --git a/keras/callbacks.py b/keras/callbacks.py
index ad3522d6..8c6f70c6 100644
--- a/keras/callbacks.py
+++ b/keras/callbacks.py
@@ -12,6 +12,8 @@ import numpy as np
import time
import json
import warnings
+import io
+import sys
from collections import deque
from collections import OrderedDict
@@ -1122,7 +... | diff --git a/tests/keras/test_callbacks.py b/tests/keras/test_callbacks.py
index 6e9c781fe..e83eb8b51 100644
--- a/tests/keras/test_callbacks.py
+++ b/tests/keras/test_callbacks.py
@@ -556,11 +556,15 @@ def test_CSVLogger(tmpdir):
# case 3, reuse of CSVLogger object
model.fit(X_train, y_train, batch_size=ba... | ============================= test session starts ==============================
platform linux -- Python 3.7.3, pytest-5.4.3, py-1.8.1, pluggy-0.13.1 -- /opt/conda/envs/a0a5407915338c9fac99516b5bd41c30/bin/python
cachedir: .pytest_cache
rootdir: /home/user/BugsInPy/temp/projects/keras, inifile: pytest.ini
plugins: for... | pytest tests/keras/test_callbacks.py::test_CSVLogger | 5b6243485acc20cc36f2db4f258512c332d691ec | tests/keras/test_callbacks.py |
keras-team__keras-11 | keras-team/keras | diff --git a/keras/engine/training_generator.py b/keras/engine/training_generator.py
index 55e817a1..f74eddf8 100644
--- a/keras/engine/training_generator.py
+++ b/keras/engine/training_generator.py
@@ -7,6 +7,7 @@ from __future__ import print_function
import warnings
import numpy as np
+from .training_utils import... | diff --git a/tests/integration_tests/test_image_data_tasks.py b/tests/integration_tests/test_image_data_tasks.py
index 4ba81028c..f0294d6c8 100644
--- a/tests/integration_tests/test_image_data_tasks.py
+++ b/tests/integration_tests/test_image_data_tasks.py
@@ -2,6 +2,7 @@ from __future__ import print_function
import n... | ============================= test session starts ==============================
platform linux -- Python 3.7.3, pytest-5.4.3, py-1.8.1, pluggy-0.13.1 -- /opt/conda/envs/ec1239e90de2b89d455019719a3688a0/bin/python
cachedir: .pytest_cache
rootdir: /home/user/BugsInPy/temp/projects/keras, inifile: pytest.ini
plugins: for... | pytest tests/integration_tests/test_image_data_tasks.py::test_image_data_generator_training | 36b9e4c055f32718a036cabaf767325b010c7485 | tests/integration_tests/test_image_data_tasks.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.