Did I find the right examples for you? yes no

All Samples(25)  |  Call(25)  |  Derive(0)  |  Import(0)
Add a detail to be reported with this test's outcome.

For more details see pydoc testtools.TestResult.

:param name: The name to give this detail.
:param content_object: The content object for this detail. See
    testtools.content for more detail.

src/s/s/sst-0.2.4/src/sst/cases.py   sst(Download)
            page_source = 'unavailable'
        self.addDetail(
            'Original exception',
            testtools.content.text_content('{0} : {1}'.format(
                exc.__class__.__name__, original_message)))
        self.addDetail('Current url',
                       testtools.content.text_content(current_url))
        self.addDetail('Page source',

src/t/e/testtools-0.9.35/testtools/tests/test_testcase.py   testtools(Download)
            def test(self):
                self.addDetail('traceback', text_content('foo'))
                self.fail('bar')
        test = Test('test')
        result = ExtendedTestResult()
            def test(self):
                self.addDetail("foo", content)
                self.expectFailure("we are sad", self.assertEqual,
                    1, 0)
        case = Case('test')
            def test(self):
                self.addDetail("foo", content)
                self.expectFailure("we are sad", self.assertEqual,
                    1, 1)
        case = Case('test')
            def test_foo(self):
                self.addDetail(
                    'foo', content.Content('text/plain', lambda: 'foo'))
        orig_test = Test('test_foo')
        cloned_test = clone_test_with_new_id(orig_test, self.getUniqueString())
            def test(self):
                self.addDetail("foo", content)
                self.assertThat("foo", Matcher())
        self.assertDetailsProvided(Case("test"), "addFailure",
            ["foo", "foo-1", "traceback"])

src/t/e/testtools-HEAD/testtools/tests/test_testcase.py   testtools(Download)
            def test(self):
                self.addDetail('traceback', text_content('foo'))
                self.fail('bar')
        test = Test('test')
        result = ExtendedTestResult()
            def test(self):
                self.addDetail("foo", content)
                self.expectFailure("we are sad", self.assertEqual,
                    1, 0)
        case = Case('test')
            def test(self):
                self.addDetail("foo", content)
                self.expectFailure("we are sad", self.assertEqual,
                    1, 1)
        case = Case('test')
            def test_foo(self):
                self.addDetail(
                    'foo', content.Content('text/plain', lambda: 'foo'))
        orig_test = Test('test_foo')
        cloned_test = clone_test_with_new_id(orig_test, self.getUniqueString())
            def test(self):
                self.addDetail("foo", content)
                self.assertThat("foo", Matcher())
        self.assertDetailsProvided(Case("test"), "addFailure",
            ["foo", "foo-1", "traceback"])

src/t/e/testtools-0.9.35/testtools/tests/test_fixturesupport.py   testtools(Download)
            def test_foo(self):
                self.useFixture(fixture)
                # Add a colliding detail (both should show up)
                self.addDetail('content',
                    content.Content(content_type.UTF8_TEXT, lambda:[_b('foo')]))

src/t/e/testtools-HEAD/testtools/tests/test_fixturesupport.py   testtools(Download)
            def test_foo(self):
                self.useFixture(fixture)
                # Add a colliding detail (both should show up)
                self.addDetail('content',
                    content.Content(content_type.UTF8_TEXT, lambda:[_b('foo')]))

src/t/e/testkraut-HEAD/testkraut/testcase.py   testkraut(Download)
        # configure default set of information to be reported for any test run
        # still can figure out why this can't be a loop
        self.addDetail('spec_info',
                Content(ct, lambda: [self._jds(self._details['spec_info'])]))
        self.addDetail('dep_info',
                Content(ct, lambda: [self._jds(self._details['dep_info'])]))
        self.addDetail('exec_info',
                Content(ct, lambda: [self._jds(self._details['exec_info'])]))
        self.addDetail('env_info',
        self.addDetail('env_info',
                Content(ct, lambda: [self._jds(self._details['env_info'])]))
        self.addDetail('metric_info',
                Content(ct, lambda: [self._jds(self._details['metric_info'])]))
        self.addDetail('output_info',

src/p/y/pyptpchdk-0.2.1/tests/test_ptp_device_operations.py   pyptpchdk(Download)
    def test_operations(self):
        all_cameras = ptp.list_devices()
        for bus_no, device_no, vendor_id, product_id, name in all_cameras:
            self.addDetail(
                'camera', text_content(u'%03i:%03i' % (bus_no, device_no)))

src/o/s/os-apply-config-0.1.14/os_apply_config/tests/test_json_renderer.py   os-apply-config(Download)
    def test_json_renderer(self):
        context = json.loads(TEST_JSON)
        x = renderers.JsonRenderer()
        result = x.render('{{a.b}}', context)
        self.addDetail('result', content.text_content(result))
        result_structure = json.loads(result)
        desire_structure = json.loads('[1,2,3,"foo"]')
        self.assertEqual(desire_structure, result_structure)
        result = x.render('{{a.c}}', context)
        self.addDetail('result', content.text_content(result))