Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade pytest to v8 #37151

Closed
wants to merge 10 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dev/breeze/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,6 @@ PLEASE DO NOT MODIFY THE HASH BELOW! IT IS AUTOMATICALLY UPDATED BY PRE-COMMIT.

---------------------------------------------------------------------------------------------------------

Package config hash: dc6668558ff6f7334e9f9a7ff9073caccd790d4ff4aab0e1228b3363677b53714310d4a2b9b43ff3e089c34fb3cdc9861350d1a495299feb3bb12c7506574c77
Package config hash: e1d1047618912d5060bf5d5dec84a8ab0104875f2fde1e30f4afbb05f7d8370b1fe364e86419bde87ec5be15a4a6aa4ce5f5ca46e411b98546f19ba28b128b21

---------------------------------------------------------------------------------------------------------
6 changes: 2 additions & 4 deletions dev/breeze/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,7 @@ dependencies = [
"psutil>=5.9.6",
"pygithub>=2.1.1",
"pytest-xdist>=3.3.1",
# Temporary upper limmit to <8, not all dependencies at that moment ready to use 8.0
# Internal meta-task for track https://github.com/apache/airflow/issues/37156
"pytest>=7.4.4,<8.0",
"pytest>=8.1.1",
"pyyaml>=6.0.1",
"requests>=2.31.0",
"rich-click>=1.7.1",
Expand All @@ -87,7 +85,7 @@ line-length = 110
target-version = ['py38', 'py39', 'py310', 'py311', 'py312']

[tool.pytest.ini_options]
addopts = "-rasl --verbosity=2 -p no:flaky -p no:nose -p no:legacypath"
addopts = "-rasl --verbosity=2 -p no:flaky -p no:legacypath"
norecursedirs = [
".eggs",
]
Expand Down
2 changes: 1 addition & 1 deletion docker_tests/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# specific language governing permissions and limitations
# under the License.
[tool.pytest.ini_options]
addopts = "-rasl --verbosity=2 -p no:flaky -p no:nose -p no:legacypath"
addopts = "-rasl --verbosity=2 -p no:flaky -p no:legacypath"
norecursedirs = [
".eggs",
]
Expand Down
4 changes: 1 addition & 3 deletions docker_tests/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# Temporary upper limmit to <8, not all dependencies at that moment ready to use 8.0
# Internal meta-task for track https://github.com/apache/airflow/issues/37156
pytest>=7.4.4,<8.0
pytest>=8.1.1
pytest-xdist
requests
2 changes: 1 addition & 1 deletion kubernetes_tests/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# specific language governing permissions and limitations
# under the License.
[tool.pytest.ini_options]
addopts = "-rasl --verbosity=2 -p no:flaky -p no:nose -p no:legacypath"
addopts = "-rasl --verbosity=2 -p no:flaky -p no:legacypath"
norecursedirs = [
".eggs",
]
Expand Down
6 changes: 2 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -348,17 +348,15 @@ devel-tests = [
"beautifulsoup4>=4.7.1",
# Coverage 7.4.0 added experimental support for Python 3.12 PEP669 which we use in Airflow
"coverage>=7.4.0",
"pytest-asyncio>=0.23.3",
"pytest-asyncio>=0.23.5",
"pytest-cov>=4.1.0",
"pytest-icdiff>=0.9",
"pytest-instafail>=0.5.0",
"pytest-mock>=3.12.0",
"pytest-rerunfailures>=13.0",
"pytest-timeouts>=1.2.1",
"pytest-xdist>=3.5.0",
# Temporary upper limmit to <8, not all dependencies at that moment ready to use 8.0
# Internal meta-task for track https://github.com/apache/airflow/issues/37156
"pytest>=7.4.4,<8.0",
"pytest>=8.1.1",
"requests_mock>=1.11.0",
"time-machine>=2.13.0",
"wheel>=0.42.0",
Expand Down
3 changes: 2 additions & 1 deletion tests/providers/fab/auth_manager/test_security.py
Original file line number Diff line number Diff line change
Expand Up @@ -1117,13 +1117,14 @@ def test_update_user_auth_stat_subsequent_unsuccessful_auth(mock_security_manage

def test_users_can_be_found(app, security_manager, session, caplog):
"""Test that usernames are case insensitive"""
existing_users = security_manager.get_all_users()
create_user(app, "Test")
create_user(app, "test")
create_user(app, "TEST")
create_user(app, "TeSt")
assert security_manager.find_user("Test")
users = security_manager.get_all_users()
assert len(users) == 1
assert len(users) == 1 + len(existing_users)
delete_user(app, "Test")
assert "Error adding new user to database" in caplog.text

Expand Down
2 changes: 1 addition & 1 deletion tests/utils/log/test_colored_log.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def test_format_time_uses_tz_aware(mock_fmt):
# get a logger that uses CustomTTYColoredFormatter
logger = logging.getLogger("test_format_time")
h = logging.StreamHandler()
h.setFormatter(CustomTTYColoredFormatter())
h.setFormatter(CustomTTYColoredFormatter(fmt="%(asctime)s: %(log_color)s%(message)s%(reset)s"))
logger.addHandler(h)

# verify that it uses TimezoneAware.formatTime
Expand Down
Loading