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

Admin: Support Python 3.13 #550

Merged
merged 1 commit into from
Jun 28, 2024
Merged
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
9 changes: 6 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,20 @@ jobs:
strategy:
matrix:
python-version:
- '3.7'
- '3.8'
- '3.9'
- '3.10'
- '3.11'
- '3.12'
- '3.13.0-beta.2'

steps:
- uses: actions/checkout@master

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
Expand All @@ -44,16 +46,17 @@ jobs:
- '3.10'
- '3.11'
- '3.12'
- '3.13.0-beta.2'
implementation:
- '' # CPython
- 'pypy' # PyPy
exclude: # unreleased;
- implementation: 'pypy'
python-version: '3.10'
- implementation: 'pypy'
python-version: '3.11'
- implementation: 'pypy'
python-version: '3.12'
- implementation: 'pypy'
python-version: '3.13.0-beta.2'

steps:
- uses: actions/checkout@master
Expand Down
6 changes: 3 additions & 3 deletions tests/test_datetimes.py
Original file line number Diff line number Diff line change
Expand Up @@ -534,17 +534,17 @@ def test_method_decorator_works_on_unittest(self) -> None:
@freeze_time('2013-04-09', as_kwarg='frozen_time')
def test_method_decorator_works_on_unittest_kwarg_frozen_time(self, frozen_time: Any) -> None:
self.assertEqual(datetime.date(2013, 4, 9), datetime.date.today())
self.assertEqual(datetime.date(2013, 4, 9), frozen_time.time_to_freeze.today())
assert frozen_time.time_to_freeze.today().strftime('%Y-%m-%d') == "2013-04-09"

@freeze_time('2013-04-09', as_kwarg='hello')
def test_method_decorator_works_on_unittest_kwarg_hello(self, **kwargs: Any) -> None:
self.assertEqual(datetime.date(2013, 4, 9), datetime.date.today())
self.assertEqual(datetime.date(2013, 4, 9), kwargs.get('hello').time_to_freeze.today()) # type: ignore
assert kwargs.get("hello").time_to_freeze.today().strftime('%Y-%m-%d') == "2013-04-09" # type: ignore

@freeze_time(lambda: datetime.date(year=2013, month=4, day=9), as_kwarg='frozen_time')
def test_method_decorator_works_on_unittest_kwarg_frozen_time_with_func(self, frozen_time: Any) -> None:
self.assertEqual(datetime.date(2013, 4, 9), datetime.date.today())
self.assertEqual(datetime.date(2013, 4, 9), frozen_time.time_to_freeze.today())
assert frozen_time.time_to_freeze.today().strftime('%Y-%m-%d') == "2013-04-09"


@freeze_time('2013-04-09')
Expand Down
Loading