Skip to content

refactor: use mock_timeit utility in categorical timeit test - #1227

Open
ovodela wants to merge 1 commit into
capitalone:mainfrom
ovodela:refactor-categorical-timeit-tests
Open

ovodela wants to merge 1 commit into
capitalone:mainfrom
ovodela:refactor-categorical-timeit-tests

Conversation

@ovodela

@ovodela ovodela commented Sep 14, 2026

Copy link
Copy Markdown

Summary

Replace the manual time.time patch (a hardcoded 17-element float array with .pop()) with the shared test_utils.mock_timeit() context manager. Two other tests in the same file (lines 934, 998) already use mock_timeit(). Remove the now-unused from unittest.mock import patch import.

Changes

  • test_categorical_column_profile.py — +1, -3

Fixes #806

Previously submitted as #1219 (closed) and #1223 (targeted stale dev branch). Clean resubmission against main.

Replace the manual time.time patch (a hardcoded 17-element float array
with .pop()) with the shared test_utils.mock_timeit() context manager.
Two other tests in the same file already use mock_timeit(). Remove the
now-unused unittest.mock.patch import.

Fixes capitalone#806
@ovodela
ovodela requested a review from a team as a code owner September 14, 2026 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Need to update Categorical for TimeIt Tests

1 participant