def make_icalculator_tests(calculator_factory):
 class ICalculatorTests(TestCase, ):
  '\n        Tests of an ``ICalculator`` implementation.\n        '
  def test_interface(self):
   '\n            The ``ICalculator`` implemention actually implements the interface.\n            '
   verifyObject(ICalculator, calculator_factory())
  @given(discovered_datasets=builds(dataset_map_from_iterable, lists(DISCOVERED_DATASET_STRATEGY)), desired_datasets=builds(dataset_map_from_iterable, lists(DESIRED_DATASET_STRATEGY)))
  def test_returns_changes(self, discovered_datasets, desired_datasets):
   '\n            ``ICalculator.calculate_changes_for_datasets`` returns a\n            ``IStateChange``.\n            '
   calculator = calculator_factory()
   changes = calculator.calculate_changes_for_datasets(discovered_datasets=discovered_datasets, desired_datasets=desired_datasets)
   self.assertTrue(IStateChange.providedBy(changes))
 return ICalculatorTests

def make_icalculator_tests ( calculator_factory ) : class ICalculatorTests ( TestCase , ) : def test_interface ( self ) : verifyObject ( ICalculator , calculator_factory ( ) ) @ given ( discovered_datasets = builds ( dataset_map_from_iterable , lists ( DISCOVERED_DATASET_STRATEGY ) ) , desired_datasets = builds ( dataset_map_from_iterable , lists ( DESIRED_DATASET_STRATEGY ) ) ) def test_returns_changes ( self , discovered_datasets , desired_datasets ) : calculator = calculator_factory ( ) changes = calculator . calculate_changes_for_datasets ( discovered_datasets = discovered_datasets , desired_datasets = desired_datasets ) self . assertTrue ( IStateChange . providedBy ( changes ) ) return ICalculatorTests
make a test case to test an icalculator implementation .