Client support for failfast with unittest

What I’m trying to do:
Run tests before running my app using the standard python unittest. If any of the tests fail, it fails fast, and throws an exception rather than continuing on running my app.

What I’ve tried and what’s not working:
This is in client_test, and comes from going through the documentation, and this Stack Overflow QA

def client_auto_tests():
  HelloButtonTest().main(failFast=True)
  #### Alternative to server tests, for free plans without Full Python server environment:
  from . import module_test
  module_test.HelloWorldTest().main()
  AltServerHelloTest().main()

Error message for the above code

TypeError: main() got an unexpected keyword argument 'failFast'
at client_test, line 18
called from startup, line 12

From what I understand about unittest, failFast param should be passed to the main function, and should cause the tests to fail fast if any of them fail? I must be missing something here.

Any help is appreciated, Also credit to @hugetim, for the original clone app. Good base to start off.

Clone link:
share a copy of your app

1 Like

The online references I saw had failfast all lowercase.

1 Like

The Skulpt implementation of unittest doesn’t support that parameter.

2 Likes

Moved to feature requests

2 Likes

@stucork, @owen.campbell,

Thank you for looking into this. I look forward to when this feature is available!

:slight_smile: