-
-
Notifications
You must be signed in to change notification settings - Fork 263
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
test: Add tests for cli.py #799
Conversation
@Mr-Sunglasses is attempting to deploy a commit to the sparckles Team on Vercel. A member of the Team first needs to authorize it. |
CodSpeed Performance ReportMerging #799 will not alter performanceComparing Summary
|
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.
Hey @Mr-Sunglasses 👋
Welcome back! Great work. I have some suggestions.
Do let me know if you have any questions 😄
Also, the CI is failing. Do have a look at that too 😄 |
unit_tests/test_create_robyn_app.py
Outdated
|
||
@pytest.fixture | ||
def project_directory(): | ||
return CURRENT_WORKING_DIR / "test_dir" |
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.
Hey @Mr-Sunglasses 👋
The windows tests are failing due to this path joining. Try doing Path.resolve
here
unit_tests/test_create_robyn_app.py
Outdated
expected_template_path = (SCAFFOLD_DIR / project_type).resolve() | ||
mock_copytree.assert_called_with(str(expected_template_path), str(expected_project_dir), dirs_exist_ok=True) | ||
if should_remove_dockerfile: | ||
expected_dockerfile_path = os.path.join(expected_project_dir, "Dockerfile") |
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.
Let use Path from pathlib here https://docs.python.org/3/library/pathlib.html#basic-use
unit_tests/test_create_robyn_app.py
Outdated
mock_copytree.assert_called_with(str(expected_template_path), str(expected_project_dir), dirs_exist_ok=True) | ||
if should_remove_dockerfile: | ||
expected_dockerfile_path = os.path.join(expected_project_dir, "Dockerfile") | ||
mock_remove.assert_called_once_with(expected_dockerfile_path) |
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.
this should fix the error here
Hey 👋🏻 @sansyrox , I think I need to revisit the |
Hey @Mr-Sunglasses , closing this as the tests have been implemented now. |
Description
This PR fixes #635