in reply to Interactive tests

Please don't prompt for anything in tests - tests are so useful because the can be exeucted automatically.

If you want a user to press Ctrl+C, you can send it a SIGINT, a interrupt signal instead.

You can either let the user provide values through configuration files or environment variables.

If you need interaction I'd suggest to skip the interactive tests unless an environment variable like $ENV{TEST_INTERACTVE} or something is set.

Replies are listed 'Best First'.
Re^2: Interactive tests
by Cagao (Monk) on Apr 17, 2008 at 21:28 UTC
    Yup, see where you're coming from, and it makes perfect sense.

    The test file in question relies on some entries in the (test/local) database, so perhaps a nice big warning is enough.

    I just don't want future users being a bit baffled as to why tests may fail.
      The nice solution is to detect if a test database can be accessed, and if not print a warning and skip the tests.
        Aye, but in this instance it's not a case of whether the test db can be accessed, it's whether the user has updated it accordingly.