Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ux: Better assignment tests UX #384

Merged
merged 1 commit into from
Mar 29, 2024
Merged

ux: Better assignment tests UX #384

merged 1 commit into from
Mar 29, 2024

Conversation

yammesicka
Copy link
Member

No description provided.

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @yammesicka - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟡 General issues: 2 issues found
  • 🟢 Security: all looks good
  • 🟡 Testing: 2 issues found
  • 🟢 Complexity: all looks good
  • 🟢 Docstrings: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

Comment on lines +470 to +477
.code-review-container {
position: relative;
direction: ltr;
text-align: left;
height: min-content;
display: flex;
overflow-x: hidden;
flex-flow: column wrap;
flex-direction: column;
flex-basis: 70vw;
flex-grow: 4;
}
Copy link

Choose a reason for hiding this comment

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

suggestion (code_clarification): Consider using a more descriptive class name.

The class name '.code-review-container' could be more specific to its purpose or content, enhancing readability and maintainability.

@@ -809,7 +878,7 @@
*/
pre[class*="language-"] {
/* Override prism.js */
padding: 0 !important;
padding: 0.5rem !important;
Copy link

Choose a reason for hiding this comment

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

suggestion (code_refinement): Use of !important in CSS should be minimized.

Consider alternative methods to increase specificity without using !important, as it can make future CSS maintenance challenging.

@@ -64,8 +64,7 @@ def _verify_comments():
first = auto_comments[0]
assert first.exercise_test_name.test_name == 'test_check_bar_bar'
assert first.exercise_test_name.pretty_test_name == 'שם כזה מגניב 2'
expected = ("AssertionError: איזה ברברון"
"assert 'bar' == 'barbaron' - barbaron + bar")
expected = "איזה ברברון"
Copy link

Choose a reason for hiding this comment

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

suggestion (testing): Consider adding a test for multi-line assertion messages.

The change in services.py now handles assertion messages differently, focusing on the first line only. It would be beneficial to ensure that this behavior is explicitly tested, especially for multi-line assertion messages, to verify that only the intended portion of the message is extracted.

@@ -64,8 +64,7 @@
first = auto_comments[0]
assert first.exercise_test_name.test_name == 'test_check_bar_bar'
assert first.exercise_test_name.pretty_test_name == 'שם כזה מגניב 2'
expected = ("AssertionError: איזה ברברון"
"assert 'bar' == 'barbaron' - barbaron + bar")
expected = "איזה ברברון"
Copy link

Choose a reason for hiding this comment

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

suggestion (testing): Ensure the test covers various assertion message formats.

Given the modification in services.py to extract and format assertion messages, it's crucial to test with various assertion message formats to confirm the robustness of the new logic. This includes testing with messages that do not start with 'AssertionError: ' to ensure they are handled correctly.

Copy link

codecov bot commented Mar 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.43%. Comparing base (42d48f5) to head (fec6f94).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #384   +/-   ##
=======================================
  Coverage   80.43%   80.43%           
=======================================
  Files          65       65           
  Lines        3067     3067           
=======================================
  Hits         2467     2467           
  Misses        600      600           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@yammesicka yammesicka merged commit 690cd69 into master Mar 29, 2024
6 checks passed
@yammesicka yammesicka deleted the revamp-tests-ux branch March 29, 2024 18:45
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.

1 participant