Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
73541f5
Final mypy config
cjw296 Mar 30, 2025
ad76ecd
Comment everything out
cjw296 Mar 30, 2025
d71a0e9
Delete datetime docs to stop doctest errors
cjw296 Mar 30, 2025
240b1d5
Implement first datetime test (test_now) with basic MockDateTime infr…
cjw296 Jul 2, 2025
d6fd01b
Implement second datetime test (test_now_with_tz_supplied) with timez…
cjw296 Jul 2, 2025
9562bea
Implement third datetime test (test_now_with_tz_setup)
cjw296 Jul 2, 2025
af2b5d3
Implement fourth datetime test with timezone error handling
cjw296 Jul 2, 2025
92c5859
Refactor mock_factory to match original implementation
cjw296 Jul 2, 2025
8550ed6
Implement fifth datetime test (test_now_with_tz_setup_and_supplied)
cjw296 Jul 2, 2025
fdc6a65
Implement sixth datetime test (test_now_with_tz_setup_and_same_supplied)
cjw296 Jul 2, 2025
d6a7267
Implement seventh datetime test (test_now_with_tz_instance) with time…
cjw296 Jul 2, 2025
e72fc8e
Implement eighth datetime test (test_now_with_tz_instance_and_supplied)
cjw296 Jul 2, 2025
911a9b1
Implement ninth datetime test (test_now_with_tz_instance_and_same_sup…
cjw296 Jul 2, 2025
be8b766
Implement tenth datetime test (test_now_supplied)
cjw296 Jul 2, 2025
444c28c
Implement eleventh datetime test (test_now_sequence)
cjw296 Jul 2, 2025
f58a73a
Implement twelfth datetime test (test_add_and_set) with set() method
cjw296 Jul 2, 2025
1c12b18
Implement thirteenth datetime test (test_add_datetime_supplied) with …
cjw296 Jul 2, 2025
1716da9
Implement fourteenth datetime test (test_instantiate_with_datetime)
cjw296 Jul 2, 2025
ea7d59e
Implement fifteenth datetime test (test_now_requested_longer_than_sup…
cjw296 Jul 2, 2025
0b93ca9
Implement sixteenth datetime test (test_call) with __new__ method for…
cjw296 Jul 2, 2025
ec41ac6
Implement seventeenth datetime test (test_date_return_type) with date…
cjw296 Jul 2, 2025
7e1daac
Implement eighteenth datetime test (test_import_and_obtain_with_lists)
cjw296 Jul 2, 2025
bb9b920
Implement nineteenth datetime test (test_repr)
cjw296 Jul 2, 2025
e667c7b
Implement twentieth datetime test (test_delta)
cjw296 Jul 2, 2025
8b8fc41
Implement twenty-first datetime test (test_delta_type)
cjw296 Jul 2, 2025
d054872
Implement twenty-second datetime test (test_set) with cast variable fix
cjw296 Jul 2, 2025
c813e52
Implement twenty-third datetime test (test_set_datetime_supplied)
cjw296 Jul 2, 2025
2245ac2
Add test_set_tz_setup: keyword argument support for set() with strict…
cjw296 Jul 2, 2025
d7dfaec
Add test_set_kw: keyword-only set() calls with strict modern typing
cjw296 Jul 2, 2025
8984e40
Add test_set_tzinfo_kw: validate tzinfo rejection with strict modern …
cjw296 Jul 2, 2025
168933a
Add test_set_tzinfo_args: validate tzinfo rejection in positional arg…
cjw296 Jul 2, 2025
fc1c9d8
Add test_add_kw: keyword-only add() calls with strict modern typing
cjw296 Jul 2, 2025
74411a5
Add test_add_tzinfo_kw: validate tzinfo rejection in add() kwargs wit…
cjw296 Jul 2, 2025
d645afb
Add test_add_tzinfo_args: validate tzinfo rejection in add() position…
cjw296 Jul 2, 2025
a290e43
Add test_max_number_args: support tzinfo as 8th positional arg with s…
cjw296 Jul 2, 2025
2bab7de
Add test_min_number_args: minimum required datetime args with strict …
cjw296 Jul 2, 2025
60df80f
Add test_all_kw: all datetime components as keyword args with strict …
cjw296 Jul 2, 2025
7cd343b
Add test_utc_now: implement utcnow() method with strict modern typing
cjw296 Jul 2, 2025
ab0b733
Add test_utc_now_with_tz: utcnow() with timezone adjustment with stri…
cjw296 Jul 2, 2025
bc44b77
Add test_isinstance_strict: implement strict mode for proper type che…
cjw296 Jul 2, 2025
6e37789
Add test_strict_addition: verify arithmetic operations preserve stric…
cjw296 Jul 2, 2025
f0a87ef
Add test_non_strict_addition: verify non-strict mode returns standard…
cjw296 Jul 2, 2025
66475c6
Add test_strict_add: verify strict mode in add() method returns corre…
cjw296 Jul 2, 2025
39e05f8
Add test_non_strict_add: verify non-strict mode in add() returns stan…
cjw296 Jul 2, 2025
840a7e0
Add test_isinstance_default: verify default non-strict isinstance beh…
cjw296 Jul 2, 2025
563ef8c
Add test_subsecond_deltas: verify fractional second deltas with stric…
cjw296 Jul 2, 2025
4dc70d5
Add test_ms_delta: verify microsecond delta type with strict modern t…
cjw296 Jul 2, 2025
b5bc9fe
Add test_tick_when_static: implement tick() method for time advanceme…
cjw296 Jul 2, 2025
4696060
Add test_tick_when_dynamic: verify tick() with dynamic deltas
cjw296 Jul 2, 2025
38eab98
Add test_tick_with_timedelta_instance: verify tick() with timedelta o…
cjw296 Jul 2, 2025
6b93533
Add test_old_import: enable backward compatibility alias with strict …
cjw296 Jul 2, 2025
7ceabd3
Add test_add_timedelta_not_strict: verify non-strict timedelta arithm…
cjw296 Jul 2, 2025
d1a39de
Add test_add_timedelta_strict: verify strict mode timedelta arithmetic
cjw296 Jul 2, 2025
d33c417
Add test_sample_tzinfos: complete timezone helper class validation
cjw296 Jul 2, 2025
943c2b4
Clean up remaining commented whitespace
cjw296 Jul 2, 2025
f13744a
Implement first MockDate test (test_today)
cjw296 Jul 2, 2025
b6de42c
Implement date tests 2-4: today_supplied, today_all_kw, today_sequence
cjw296 Jul 2, 2025
0eaf0a2
Implement date tests 5-11: test_call, test_repr, test_delta, test_del…
cjw296 Jul 2, 2025
e9b74a1
Complete MockDate implementation with 21 tests passing
cjw296 Jul 2, 2025
0b44583
Add 4 more MockDate tests: strict mode functionality
cjw296 Jul 2, 2025
e4f1aa3
Complete MockDate implementation with all 30 tests passing
cjw296 Jul 2, 2025
c8a9a6a
Implement test_date_return_type_picky in datetime tests
cjw296 Jul 2, 2025
627e4f0
Implement first MockTime test (test_time_call)
cjw296 Jul 2, 2025
94890e1
Implement test_delta for MockTime
cjw296 Jul 2, 2025
f16aeee
Implement test_delta_type for MockTime
cjw296 Jul 2, 2025
d6f80a3
Implement test_set for MockTime
cjw296 Jul 2, 2025
6924040
Implement test_set_datetime_supplied for MockTime
cjw296 Jul 2, 2025
fcb82ad
Implement test_set_kw for MockTime
cjw296 Jul 2, 2025
1b829b0
Implement test_set_kw_tzinfo for MockTime
cjw296 Jul 2, 2025
07d9627
Implement test_set_args_tzinfo for MockTime
cjw296 Jul 2, 2025
f56047b
Implement test_add_kw for MockTime
cjw296 Jul 2, 2025
039cbed
Implement test_add_tzinfo_kw, test_add_tzinfo_args, test_max_number_a…
cjw296 Jul 2, 2025
6fd7287
Implement test_max_number_tzinfo, test_min_number_args, test_all_kw, …
cjw296 Jul 2, 2025
5123a29
Complete all MockTime tests - test_instance_tzinfo through test_old_i…
cjw296 Jul 2, 2025
895a86a
Fix more whitespace and stray comments
cjw296 Jul 2, 2025
08adb7d
typing.Self is always available in the versions we support
cjw296 Jul 2, 2025
b397df4
Tidy up commented out stuff and bring back lost docstrings
cjw296 Jul 2, 2025
1e8f6f2
Simplify MockedCurrent.add
cjw296 Jul 2, 2025
9d5ad06
Simplify MockedCurrent._mock_date_type
cjw296 Jul 2, 2025
46cf0cd
Remove unnecessary _make_correct_mock_type abstraction
cjw296 Jul 2, 2025
e11f7c4
Revert "Delete datetime docs to stop doctest errors"
cjw296 Jul 2, 2025
82bbde4
Remove unnecessary changes to MockDateTime.now()
cjw296 Jul 2, 2025
6640847
Remove some casts
cjw296 Jul 2, 2025
27f4d96
Make Queue generic to improve type safety and reduce casts
cjw296 Jul 2, 2025
0eccac9
type-ignore instead of cast
cjw296 Jul 2, 2025
f39be9b
Make MockedCurrent generic to improve type safety
cjw296 Jul 2, 2025
7a35676
Remove all cast's from datetime.py
cjw296 Jul 2, 2025
2ea994f
Remove one type ignore comment in MockedCurrent.__add__
cjw296 Jul 2, 2025
7461c60
remove unnecessary method call
cjw296 Jul 2, 2025
59ffe01
tidyup
cjw296 Jul 2, 2025
37a4dec
Add TypedDict parameter specifications
cjw296 Jul 3, 2025
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
14 changes: 10 additions & 4 deletions mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,20 @@ plugins =
[mypy.plugins.django-stubs]
django_settings_module = "testfixtures.tests.test_django.settings"

# Things that need to be resolved before adding a py.typed:
[mypy-testfixtures.datetime]
disable_error_code = no-untyped-def

# "nice to have" stuff to fix:
[mypy-testfixtures.tests.*]
disable_error_code = no-untyped-call,no-untyped-def

# Be more picky with mock_(date|time) tests:
[mypy-testfixtures.tests.test_date]
enable_error_code = no-untyped-call,no-untyped-def

[mypy-testfixtures.tests.test_datetime]
enable_error_code = no-untyped-call,no-untyped-def

[mypy-testfixtures.tests.test_time]
enable_error_code = no-untyped-call,no-untyped-def

# permanent exclusions and workaround:
[mypy-constantly.*]
ignore_missing_imports = True
Expand Down
Loading