Пример #1
0
    def do_add_tests(self, command):
        """
        Add the given tests to the test suite. Tests should be supplied as
        comma separated numbers or numeric ranges, for example:

        add_tests 1-3, 5, 6, 7

        Would add tests 1, 2, 3, 5, 6, 7 to the test suite.

        You can check which tests are available by issuing the show_tests
        command or remove tests that have been added to the suite by issuing
        the remove_tests command.
        """
        try:
            ids = utils.parseRange(command)
        except ValueError:
            log.error('Invalid test range specified: ' + command)
            return
        for testId in ids:
            self.test_set.add(testId)
        self.show_test_selection()
Пример #2
0
    def do_add_tests(self, command):
        """
        Add the given tests to the test suite. Tests should be supplied as
        comma separated numbers or numeric ranges, for example:

        add_tests 1-3, 5, 6, 7

        Would add tests 1, 2, 3, 5, 6, 7 to the test suite.

        You can check which tests are available by issuing the show_tests
        command or remove tests that have been added to the suite by issuing
        the remove_tests command.
        """
        try:
            ids = utils.parseRange(command)
        except ValueError:
            log.error('Invalid test range specified: ' + command)
            return
        for testId in ids:
            self.test_set.add(testId)
        self.show_test_selection()
Пример #3
0
    def do_remove_tests(self, command):
        """
        Remove the given tests from the test suite. Tests should be supplied
        as comma separated numbers or numeric ranges, for example:

        remove_tests 1-3, 5, 6, 7

        Would remove tests 1, 2, 3, 5, 6, 7 from the test suite.

        You can check which tests are available by issuing the show_tests
        command or add tests by issuing the add_tests command.
        """
        try:
            ids = utils.parseRange(command)
        except ValueError:
            log.error('Invalid test range specified: ' + command)
            return
        for testId in ids:
            try:
                self.test_set.remove(testId)
            except KeyError:
                pass
        self.show_test_selection()
Пример #4
0
    def do_remove_tests(self, command):
        """
        Remove the given tests from the test suite. Tests should be supplied
        as comma separated numbers or numeric ranges, for example:

        remove_tests 1-3, 5, 6, 7

        Would remove tests 1, 2, 3, 5, 6, 7 from the test suite.

        You can check which tests are available by issuing the show_tests
        command or add tests by issuing the add_tests command.
        """
        try:
            ids = utils.parseRange(command)
        except ValueError:
            log.error('Invalid test range specified: ' + command)
            return
        for testId in ids:
            try:
                self.test_set.remove(testId)
            except KeyError:
                pass
        self.show_test_selection()