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

create a test runner #23

Open
gabrielfalcao opened this issue Nov 20, 2012 · 4 comments
Open

create a test runner #23

gabrielfalcao opened this issue Nov 20, 2012 · 4 comments

Comments

@gabrielfalcao
Copy link
Owner

gabrielfalcao commented Nov 20, 2012

sure should be a test runner and just like lettuce, provide the following feature:

a "bootstrap" file

when running sure should try to import a confidency.py and there the developer will be able to declare some "hooks":

# confidence.py

from sure.hooks import before, after

@before.each_test
def clear_database(test):
    if "myapp.redis_layer" in test.__module__:
        # do whatever actions specific to tests under myapp.redis_layer

rant of possible hooks:

  • @before.each_test
  • @before.each_module
  • @before.each_package
  • @before.all
  • @after.each_test
  • @after.each_module
  • @after.each_package
  • @after.all

EDIT by @timofurrer: content of former TODO.md:

Test runner with chronometer and coverage reports

Sure provides you with a test runner that gives you full control
over the process to the granularity of a single test case.

You can write your tests anywhere, sure will find, run, count up the
duration and allow running every test case, in the end you get
acquainted with the statistics of your python codebase: what parts
have test coverage, where you should refactor or add coverage.

It also runs flake8 against
your test code and blame you when your tests are too complex

Ahh yes, you can also run only a given subset of test cases, force
slow tests to fail.

@timofurrer
Copy link
Collaborator

I think this only makes sense if there is a big advantage over pytest, nose, unittest and other existing test runners.

Any more details on your idea?

@gabrielfalcao
Copy link
Owner Author

I agree, I personally have been using nose, exclusively, from the beginning.
I think that this should have the lowest priority for now :)

@timofurrer
Copy link
Collaborator

I totally agree. Let's keep the issue open though - I'll label it accordingly.

@gabrielfalcao
Copy link
Owner Author

Presently developing a runner, this is the highest priority for sure

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants