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

attempted to clarify test and suite generation #102

Merged
merged 1 commit into from
Oct 11, 2015

Conversation

FND
Copy link
Collaborator

@FND FND commented Oct 11, 2015

This is very much a light version of what I had planned originally: I was considering introducing a set of intermediate classes (GabbiTestDescriptor[Collection]?) to encapsulate and shuffle around some of the logic in both test_suite_from_yaml and TestMaker, but I'm no longer convinced it's worth the effort (for now anyway).

Nevertheless, these leftovers of that aborted effort seem to better describe what's going on, if only by grouping related aspects within the existing function.

What still irks me is that test_suite_from_yaml actually doesn't have anything to do with YAML: It's merely processing a dictionary that once happened to originate from a YAML file. However, I couldn't figure out how to get around that without introducing new terminology (see above).

@FND FND force-pushed the suite-generation-tweaks branch 2 times, most recently from d1bfb90 to 7b391ce Compare October 11, 2015 18:53
structural changes are mostly about proximity
@FND FND force-pushed the suite-generation-tweaks branch from 7b391ce to 1ab17b9 Compare October 11, 2015 18:54
@cdent
Copy link
Owner

cdent commented Oct 11, 2015

Yeah, this seems like a good bit of tidying.

If you've seen my recent 2.0 related blog posting then you will see your thoughts "to encapsulate and shuffle around some of the logic" reflected there.

The lack of yaml in test_suite_from_yaml irks me too. It's probably safe to rename it as it is not really a part of the public api[1], which would bring things closer to something easier to abstract and indirect.

[1] The public api is effectively:

  • the format of the tests
  • the functionality of the things that will eventually be in ContentHandlers:
    • response handlers
    • replacers
    • data to request bodies
  • the build_test method
  • the arguments of and inputs to gabbi-run

If we do rename test_suite_from_yaml we might want to leave behind a shim to protect people who have done their own integrations like the hypothesis + gabbi thing linked from #94 or at least tell those people about the change.

cdent added a commit that referenced this pull request Oct 11, 2015
attempted to clarify test and suite generation
@cdent cdent merged commit e77333d into cdent:master Oct 11, 2015
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.

2 participants