Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Rename Testing Base Classes#4453

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Bibo-Joshi merged 1 commit intomasterfromrename-test-classes
Sep 3, 2024
Merged

Conversation

Bibo-Joshi
Copy link
Member

addresses part sof#4324

Example console output before and after renaming:

(venv311)~\PycharmProjects\python-telegram-bot git:[rename-test-classes]pytest -v -k NoMatchTest=======================================================================test session starts =======================================================================platform win32 -- Python 3.11.9, pytest-8.2.2, pluggy-1.5.0 -- C:\Users\hinri\PycharmProjects\python-telegram-bot\venv311\Scripts\python.execachedir: .pytest_cacherootdir: C:\Users\hinri\PycharmProjects\python-telegram-botconfigfile: pyproject.tomltestpaths: testsplugins: anyio-4.4.0, flaky-3.8.1, asyncio-0.21.2, socket-0.7.0, xdist-3.6.1, web3-6.18.0asyncio: mode=Mode.AUTOcollected 6200 items / 6200 deselected / 0 selected                                                                                                                ==================================================================== 6200 deselectedin 17.72s ====================================================================(venv311)~\PycharmProjects\python-telegram-bot git:[rename-test-classes]pytest -v -k NoMatchTest=======================================================================test session starts =======================================================================platform win32 -- Python 3.11.9, pytest-8.2.2, pluggy-1.5.0 -- C:\Users\hinri\PycharmProjects\python-telegram-bot\venv311\Scripts\python.execachedir: .pytest_cacherootdir: C:\Users\hinri\PycharmProjects\python-telegram-botconfigfile: pyproject.tomltestpaths: testsplugins: anyio-4.4.0, flaky-3.8.1, asyncio-0.21.2, socket-0.7.0, xdist-3.6.1, web3-6.18.0asyncio: mode=Mode.AUTOcollected 6200 items / 6200 deselected / 0 selected                                                                                                                ==================================================================== 6200 deselectedin 12.71s ====================================================================

Note that the number of collected items didnot change. What did change is the elapsed time, however I'm not sure if this is really reproducable. In any case, it doesn't hurt to rename these classes and if on average it does speed up the collection that's a good thing :)

@harshil21
Copy link
Member

harshil21 commentedSep 3, 2024
edited
Loading

Thanks! I ranhyperfine withpytest's--collect-only, and the results were not conclusive (compared with master):

(python-telegram-bot) ➜  python-telegram-bot git:(master) ✗ hyperfine"pytest --collect-only"Benchmark 1: pytest --collect-only  Time (mean ± σ):      2.997 s ±  0.118 s    [User: 2.897 s, System: 0.094 s]  Range (min … max):    2.928 s …  3.310 s    10 runs   Warning: Statistical outliers were detected. Consider re-running this benchmark on a quiet system without any interferences from other programs. It mighthelp to use the'--warmup' or'--prepare' options. (python-telegram-bot) ➜  python-telegram-bot git:(master) ✗ git checkout rename-test-classes Switched to branch'rename-test-classes'Your branch is up to date with'origin/rename-test-classes'.(python-telegram-bot) ➜  python-telegram-bot git:(rename-test-classes) ✗ hyperfine"pytest --collect-only"Benchmark 1: pytest --collect-only  Time (mean ± σ):      3.207 s ±  0.933 s    [User: 3.107 s, System: 0.095 s]  Range (min … max):    2.888 s …  5.861 s    10 runs   Warning: The first benchmarking runfor thiscommand was significantly slower than the rest (5.861 s). This could be caused by (filesystem) caches that were not filleduntil after the first run. You should consider using the'--warmup' option to fill those caches before the actual benchmark. Alternatively, use the'--prepare' option to clear the caches before each timing run.

My guess is that those classes are collected because they are being subclassed..

@Bibo-Joshi
Copy link
MemberAuthor

That means that you would prefernot to merge or that you agree with

In any case, it doesn't hurt to rename these classes and if on average it does speed up the collection that's a good thing :)

? :)

@harshil21
Copy link
Member

I agree we should we merge anyway, but was kinda hoping that there was a little speedup for collection.

Bibo-Joshi reacted with thumbs up emoji

@harshil21harshil21 added the ⚙️ testsaffected functionality: tests labelSep 3, 2024
@Bibo-JoshiBibo-Joshi merged commitb9d2efd intomasterSep 3, 2024
26 of 27 checks passed
@Bibo-JoshiBibo-Joshi deleted the rename-test-classes branchSeptember 3, 2024 03:24
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsSep 10, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@harshil21harshil21Awaiting requested review from harshil21

Assignees
No one assigned
Labels
⚙️ testsaffected functionality: tests
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@Bibo-Joshi@harshil21

[8]ページ先頭

©2009-2025 Movatter.jp