c.t.t.t.TestPollingTaskSource(TestCase) : class documentation

Part of canonical.twistedsupport.tests.test_task View In Hierarchy

Tests for PollingTaskSource.
Method setUp Undocumented
Method makeTaskSource Make a task source for testing.
Method test_provides_ITaskSource Undocumented
Method test_start_commences_polling Undocumented
Method test_noTasksFound_called_when_no_tasks_found Undocumented
Method test_start_continues_polling Undocumented
Method test_stop_stops_polling Undocumented
Method test_stop_deferred_fires_immediately_if_no_polling Undocumented
Method test_start_multiple_times_polls_immediately Undocumented
Method test_start_multiple_times_resets_polling_loop Undocumented
Method test_starting_again_changes_consumer Undocumented
Method test_task_consumer_not_called_when_factory_doesnt_produce Undocumented
Method test_stop_without_start Undocumented
Method test_stop_multiple_times Undocumented
Method test_producer_returns_deferred Undocumented
Method test_only_one_producer_call_at_once Undocumented
Method test_stop_deferred_doesnt_fire_until_polling_finished Undocumented
Method test_stop_deferred_fires_with_false_if_source_restarted Undocumented
Method test_stop_start_stop_when_polling_doesnt_poll_again Undocumented
Method test_taskStarted_deferred_doesnt_delay_polling Undocumented
Method test_producer_errors_call_taskProductionFailed Undocumented
Method test_taskProductionFailed_deferred_doesnt_delay_polling Undocumented
Method _default_task_producer Producer that records the number of times it has been called.

Inherited from TestCase:

Method installFixture Install 'fixture', an object that has a setUp and tearDown.
Method makeTemporaryDirectory Create a temporary directory, and return its path.
Method assertProvides Assert 'obj' correctly provides 'interface'.
Method assertClassImplements Assert 'cls' may correctly implement 'interface'.
Method assertNotifies Assert that a callable performs a given notification.
Method assertNoNotification Assert that no notifications are generated by the callable.
Method assertNoNewOops Assert that no oops has been recorded since old_oops.
Method assertSqlAttributeEqualsDate Fail unless the value of the attribute is equal to the date.
Method assertEqual Assert that 'a' equals 'b'.
Method assertIsInstance Assert that an instance is an instance of assert_class.
Method assertIsNot Assert that expected is not the same object as observed.
Method assertContentEqual Assert that 'iter1' has the same content as 'iter2'.
Method assertRaisesWithContent Check if the given exception is raised with given content.
Method assertBetween Assert that 'variable' is strictly between two boundaries.
Method pushConfig Push some key-value pairs into a section of the config.
Method assertStatementCount Assert that the expected number of SQL statements occurred.
Method useTempDir Use a temporary directory for this test.
def setUp(self):
Undocumented
def _default_task_producer(self):
Producer that records the number of times it has been called.
ReturnsNone, indicating that there are no tasks to do right now.
def makeTaskSource(self, task_producer=None, interval=None, clock=None):
Make a task source for testing.
Parameterstask_producerThe producer of tasks. Defaults to a producer that returns None and increments a count of the number of times it has been called.
intervalThe interval between polls. Defaults to an arbitrary integer.
clockThe clock to use for measuring the interval. Defaults to an instance of Clock.
ReturnsA PollingTaskSource.
def test_provides_ITaskSource(self):
Undocumented
def test_start_commences_polling(self):
Undocumented
def test_noTasksFound_called_when_no_tasks_found(self):
Undocumented
def test_start_continues_polling(self):
Undocumented
def test_stop_stops_polling(self):
Undocumented
def test_stop_deferred_fires_immediately_if_no_polling(self):
Undocumented
def test_start_multiple_times_polls_immediately(self):
Undocumented
def test_start_multiple_times_resets_polling_loop(self):
Undocumented
def test_starting_again_changes_consumer(self):
Undocumented
def test_task_consumer_not_called_when_factory_doesnt_produce(self):
Undocumented
def test_stop_without_start(self):
Undocumented
def test_stop_multiple_times(self):
Undocumented
def test_producer_returns_deferred(self):
Undocumented
def test_only_one_producer_call_at_once(self):
Undocumented
def test_stop_deferred_doesnt_fire_until_polling_finished(self):
Undocumented
def test_stop_deferred_fires_with_false_if_source_restarted(self):
Undocumented
def test_stop_start_stop_when_polling_doesnt_poll_again(self):
Undocumented
def test_taskStarted_deferred_doesnt_delay_polling(self):
Undocumented
def test_producer_errors_call_taskProductionFailed(self):
Undocumented
def test_taskProductionFailed_deferred_doesnt_delay_polling(self):
Undocumented
API Documentation for Launchpad, generated by pydoctor at 2010-03-21 00:00:03.