Skip to content

Commit 43ec93f

Browse files
committed
fixup! Add deprecation tests and move deprecated tests
1 parent 0200bb4 commit 43ec93f

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

tests/test_deprecated.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ def test_tbd_remove_in_v0_11_0_trainer_gpu():
2828
gpu_usage = GpuUsageLogger()
2929

3030

31-
@pytest.mark.parametrize(['input', 'expected'], [
31+
@pytest.mark.parametrize(['input_arg', 'expected'], [
3232
(True, SimpleProfiler),
3333
(False, PassThroughProfiler),
3434
])
35-
def test_trainer_profiler_remove_in_v0_11_0_trainer(input, expected):
35+
def test_trainer_profiler_remove_in_v0_11_0_trainer(input_arg, expected):
3636
with pytest.deprecated_call(match='will be removed in v0.11.0'):
37-
trainer = Trainer(profiler=input)
37+
trainer = Trainer(profiler=input_arg)
3838
assert isinstance(trainer.profiler, expected)
3939

4040

tests/trainer/test_trainer.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1182,15 +1182,15 @@ def test_row_log_interval(log_metrics_mock, tmpdir, train_batches, max_steps, lo
11821182
log_metrics_mock.assert_has_calls(expected_calls)
11831183

11841184

1185-
@pytest.mark.parametrize(['input', 'expected'], [
1185+
@pytest.mark.parametrize(['input_arg', 'expected'], [
11861186
(None, PassThroughProfiler),
11871187
(SimpleProfiler(), SimpleProfiler),
11881188
(AdvancedProfiler(), AdvancedProfiler),
11891189
('simple', SimpleProfiler),
11901190
('advanced', AdvancedProfiler),
11911191
])
1192-
def test_trainer_profiler_correct_args(input, expected):
1193-
kwargs = {'profiler': input} if input is not None else {}
1192+
def test_trainer_profiler_correct_args(input_arg, expected):
1193+
kwargs = {'profiler': input_arg} if input_arg is not None else {}
11941194
trainer = Trainer(**kwargs)
11951195
assert isinstance(trainer.profiler, expected)
11961196

0 commit comments

Comments
 (0)