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

Allow creation of nitrate cases when exporting #185

Merged
merged 2 commits into from
Apr 3, 2020
Merged

Conversation

hegerj
Copy link
Collaborator

@hegerj hegerj commented Apr 1, 2020

Added option --create which will create testcase in nitrate if it
doesn't exist.
Implements #117.

@hegerj hegerj requested review from lukaszachy and psss April 1, 2020 15:23
@hegerj
Copy link
Collaborator Author

hegerj commented Apr 1, 2020

@psss There are couple of TODOs left in the code, could you please check those?

@hegerj
Copy link
Collaborator Author

hegerj commented Apr 2, 2020

Because of the second function that needed nitrate I moved its import outside which brought back the import problem (thats why the checks are failing I believe).
Question is what to do about it.

  1. move the import back into function export_to_nitrate() and import nitrate in create_nitrate_case() as well
  2. move the import back into function export_to_nitrate() and pass the nitrate as parameter to create_nitrate_case()
  3. rework create_nitrate_case() to not need nitrate and handle test case creation in export_to_nitrate()

What do you think/do you have different solution? Neither of those I proposed look good to me.

@psss
Copy link
Collaborator

psss commented Apr 2, 2020

I would suggest to import in both functions. Python does the import only once so it basically does not matter.

@psss psss self-assigned this Apr 3, 2020
@psss psss added command | export The export command command | tests tmt tests command labels Apr 3, 2020
hegerj and others added 2 commits April 3, 2020 11:48
Added option --create which will create testcase in nitrate if it
doesn't exist.
Implements #117.
@psss psss force-pushed the allow_test_creation branch from 48201b6 to 3f8c604 Compare April 3, 2020 09:49
@psss
Copy link
Collaborator

psss commented Apr 3, 2020

Thanks for writing support for test case creation.
Adjusted in 3f8c604 and going to merge if tests pass.

@lgtm-com
Copy link

lgtm-com bot commented Apr 3, 2020

This pull request introduces 1 alert when merging 3f8c604 into 445751f - view on LGTM.com

new alerts:

  • 1 for Module is imported with 'import' and 'import from'

@psss psss merged commit 2f21e0d into master Apr 3, 2020
@psss psss deleted the allow_test_creation branch April 3, 2020 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
command | export The export command command | tests tmt tests command
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants