[test] Simplify st.audio_input test app#12541
[test] Simplify st.audio_input test app#12541sfc-gh-nbellante merged 2 commits intographite-base/12541from
st.audio_input test app#12541Conversation
🎉 Snyk checks have passed. No issues have been found so far.✅ security/snyk check is complete. No issues have been found. (View Details) ✅ license/snyk check is complete. No issues have been found. (View Details) |
✅ PR preview is ready!
|
This stack of pull requests is managed by Graphite. Learn more about stacking. |
📉 Frontend coverage change detectedThe frontend unit test (vitest) coverage has decreased by 0.0300%
💡 Consider adding more unit tests to maintain or improve coverage. |
643ad26 to
93d9ce8
Compare
63e48bf to
31a610e
Compare
st.audio_input test app
9ede320 to
62f76d0
Compare
62f76d0 to
4cc7ac9
Compare
0e0fb7d to
8f07a70
Compare
d4b6e04 to
018ba0b
Compare
Remove redundant and over-engineered features while keeping essential test coverage: - Removed duplicate WAV analysis displays - Removed verbose function wrappers - Kept essential test scenarios: forms, fragments, callbacks, remount, sample rates - Maintained all critical test assertions
018ba0b to
8cf88ab
Compare
8f07a70 to
71fe8f0
Compare
| def on_change(): | ||
| st.session_state.audio_input_changed = True |
There was a problem hiding this comment.
The on_change function lacks a docstring. Python Guide docstring requirements mandate Numpydoc style docstrings for functions. Since this callback function is used with st.audio_input and may be accessed by users, add a docstring explaining its purpose:
def on_change():
"""Callback function to set a flag when audio input changes."""
st.session_state.audio_input_changed = True| def on_change(): | |
| st.session_state.audio_input_changed = True | |
| def on_change(): | |
| """Callback function to set a flag when audio input changes.""" | |
| st.session_state.audio_input_changed = True | |
Spotted by Diamond (based on custom rule: Python Guide)
Is this helpful? React 👍 or 👎 to let us know.

Describe your changes
This PR focuses on cleaning up the test streamlit app for st.audio_input to be more straightforward and easier to maintain.
Contribution License Agreement
By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.