Skip to content
Open
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
10 changes: 9 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ jobs:
toxenv: docs
- python-version: "3.13"
toxenv: twinecheck
- python-version: "3.13"
toxenv: py
timezone: "Pacific/Auckland"
- python-version: "3.13"
toxenv: py
timezone: "Pacific/Fiji"
steps:
- uses: actions/checkout@v3
- name: 'Set up Python ${{ matrix.python-version }}'
Expand All @@ -45,7 +51,9 @@ jobs:
python -m pip install --upgrade pip
pip install tox
- name: Run tests
run: tox -e ${{ matrix.toxenv || 'py' }}
run: |
TZ=${{ matrix.timezone || 'UTC' }} echo "Running tests with timezone: $TZ"
TZ=${{ matrix.timezone || 'UTC' }} tox -e ${{ matrix.toxenv || 'py' }}
- name: Upload coverage.xml to codecov
uses: codecov/codecov-action@v5
with:
Expand Down
2 changes: 1 addition & 1 deletion tests/test_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from dateparser_data.settings import default_parsers
from tests import BaseTestCase

today = datetime.datetime.today()
today = datetime.datetime.now(tz=pytz.timezone("UTC"))


class TestTranslateSearch(BaseTestCase):
Expand Down
1 change: 1 addition & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ deps =
atheris; python_version < '3.12'
commands =
pytest --cov=dateparser --cov-report=xml {posargs: tests}
passenv = TZ

[testenv:all]
basepython = python3.13
Expand Down
Loading