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

Add tests for ModulemdModuleStream description #407

Merged
merged 1 commit into from
Jan 23, 2020
Merged

Add tests for ModulemdModuleStream description #407

merged 1 commit into from
Jan 23, 2020

Conversation

Norem80
Copy link
Contributor

@Norem80 Norem80 commented Dec 14, 2019

Copied python tests for Modulemd.ModuleStream.description into C as a Google Code-in 2019 Task.

Copy link
Member

@OrionStar25 OrionStar25 left a comment

Choose a reason for hiding this comment

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

Everything else looks good! Thank you :D

@@ -21,6 +21,9 @@
"À϶¥🌭∮⇒⇔¬β∀₂⌀ıəˈ⍳⍴V)" \
"═€ίζησθლბშიнстемองจึองታሽ።ደለᚢᛞᚦᚹ⠳⠞⠊⠎▉▒▒▓😃"

#define MMD_TEST_DESC_LOCALE "C"
Copy link
Member

Choose a reason for hiding this comment

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

I don't think this is necessary as "C" refers to the default locale. It's unlikely to change. I personally think the readability is being lost by such a huge macro, but I think we'll let this stay.

@sgallagher What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So should I just write "C" as an argument rather then create macro?

Copy link
Member

@OrionStar25 OrionStar25 left a comment

Choose a reason for hiding this comment

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

I also forgot an important case that was discussed last time.
Please also add a test/assertion in the case when the description contains any kind of Unicode. The macro for it is already defined. MMD_TEST_DOC_UNICODE_TEXT.
Please look at the documentation tests to see how it has been done.

@Norem80
Copy link
Contributor Author

Norem80 commented Dec 14, 2019

Added that.

Copy link
Member

@OrionStar25 OrionStar25 left a comment

Choose a reason for hiding this comment

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

The output from the failed tests:
92/94 test_dirty_repo                         FAIL     0.28 s (exit status 64)
--- command ---
/usr/bin/python3 /builddir/travis/../modulemd/tests/test-dirty.py
--- stdout ---
Autoformatter was not run before submitting. Please run `ninja test`, amend the commit and resubmit this pull request.

@Norem80 your CI tests are failing because of linting issue. Please always run ninja test before committing. This also enables proper linting for the entire codebase before submission. I would also like you to squash all of your commits into one single commit. We always aim for 1 commit per 1 logical change. In this case, 1 commit for 1 added test.

@sgallagher
Copy link
Collaborator

There are conflicts with the current master branch. Would you mind doing a git rebase and resolving them, please?

@sgallagher
Copy link
Collaborator

@Norem80 Please rebase this pull request.

sgallagher added a commit that referenced this pull request Jan 23, 2020
Add tests for ModulemdModuleStream description

Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
@sgallagher sgallagher merged commit f4ebe8d into fedora-modularity:master Jan 23, 2020
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.

None yet

3 participants