Skip to content

Conversation

@sfc-gh-kbregula
Copy link
Contributor

@sfc-gh-kbregula sfc-gh-kbregula commented Nov 10, 2022

📚 Context

I was working on the tests for st.map and saw that the assertTrue function was used there. This makes the error message not very helpful.

Here is the difference:

-E       AssertionError: False is not true
+E       AssertionError: 'Map data must contain a column named' not found in 'Invalid exception'

Hopefully we'll start using plain assert-statements instead of self.assert* functions someday, and then similar problems won't happen.

Please describe the project or issue background here

  • What kind of change does this PR introduce?

    • Bugfix
    • Feature
    • Refactoring
    • Other, please describe:

🧠 Description of Changes

  • Add bullet points summarizing your changes here

    • This is a breaking API change
    • This is a visible (user-facing) change

Revised:

Insert screenshot of your updated UI/code here

Current:

Insert screenshot of existing UI/code here

🧪 Testing Done

  • Screenshots included
  • Added/Updated unit tests
  • Added/Updated e2e tests

🌐 References

Does this depend on other work, documents, or tickets?

  • Issue: Closes #XXXX

Contribution License Agreement

By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.

Comment on lines 47 to 41
self.assertTrue(re.search(GITHUB_SSH_URL, "git@github.com:username/repo.git"))
self.assertTrue("git@github.com:username/repo.git", GITHUB_SSH_URL)

# no .git
self.assertTrue(re.search(GITHUB_SSH_URL, "git@github.com:username/repo"))
self.assertTrue("git@github.com:username/repo", GITHUB_SSH_URL)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missed two replacements to self.assertRegex here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good eye 👀

@sfc-gh-kbregula sfc-gh-kbregula merged commit 4806f4a into develop Nov 13, 2022
@sfc-gh-kbregula sfc-gh-kbregula deleted the assert-in branch November 13, 2022 17:50
tconkling added a commit to tconkling/streamlit that referenced this pull request Nov 18, 2022
* develop: (25 commits)
  Fix CORS acronym in docstring (streamlit#5727)
  Add integration tests for Snowpark (streamlit#5543)
  Release/1.15.0 (streamlit#5720)
  Add audit_frontend_dependencies script to CODEOWNERS (streamlit#5708)
  Add label_visibility option for st.checkbox (streamlit#5705)
  Display existing column names in st.map exception and make st.map work with capital letters (streamlit#5679)
  Plotly Customization (streamlit#5681)
  Turn off theme for now (streamlit#5701)
  Add all vendored code to `make notices` (streamlit#5704)
  Audit frontend licenses (streamlit#5664)
  Surround labels in quotes (streamlit#5703)
  Add info about voting on features (streamlit#5660)
  Update issue labeling scheme to adopt new standards (streamlit#5702)
  Cached media (audio+video) replay (streamlit#5695)
  Fix docstring line wrap (streamlit#5698)
  Use specialized assertion functions (streamlit#5680)
  Release 1.14.1 (streamlit#5693)
  Image replay in cached functions (streamlit#5675)
  Add docstrings for `experimental_allow_widgets` (streamlit#5670)
  Remove `st.write` from `CachedStFunctionWarning` (streamlit#5669)
  ...
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.

3 participants