-
-
Notifications
You must be signed in to change notification settings - Fork 338
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
Refactor dependents tests using library usecase #1572
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1572 +/- ##
=======================================
Coverage 92.61% 92.61%
=======================================
Files 142 142
Lines 6353 6353
=======================================
Hits 5884 5884
Misses 469 469
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
# excluding the possibility of circulal reference | ||
def test_circular_reference(engine, library_tables_oids): | ||
with engine.begin() as conn: | ||
conn.execute(text('ALTER TABLE "Publishers" ADD COLUMN "Top Publication" integer')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should add a self-referential field to the dataset instead of creating it in the test case. I have added an issue for it here mathesar-foundation/mathesar-data-playground#5.
Don't worry about it making the change now, just add a to-do, so that we can refactor it later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test cases are throwing up an error because it is not able to determine the schema, instead of using a raw SQL statement, a better option would be to replace with an equivalent function db.columns.operations.create.create_column
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, Thanks for the PR @Jyuart!
Fixes #1571
Utilize library use cases for dependents tests and refactor them to make them more readable.
Checklist
Update index.md
).master
branch of the repositoryvisible errors.
Developer Certificate of Origin
Developer Certificate of Origin