Did I find the right examples for you? yes no

All Samples(101)  |  Call(101)  |  Derive(0)  |  Import(0)
Assert that 'expected' is 'observed'.

:param expected: The expected value.
:param observed: The observed value.
:param message: An optional message describing the error.

src/t/e/testtools-0.9.35/testtools/tests/test_testcase.py   testtools(Download)
    def test_assertIs(self):
        # assertIs asserts that an object is identical to another object.
        self.assertIs(None, None)
        some_list = [42]
        self.assertIs(some_list, some_list)
        some_object = object()
        self.assertIs(some_object, some_object)
        marker = object()
        value = getattr(self, 'doesntexist', marker)
        self.assertIs(marker, value)
 
 
    def test_returns_wrapped(self):
        # Calling Nullary returns whatever the function returns.
        ret = object()
        wrapped = Nullary(lambda: ret)
        self.assertIs(ret, wrapped())

src/t/e/testtools-HEAD/testtools/tests/test_testcase.py   testtools(Download)
    def test_assertIs(self):
        # assertIs asserts that an object is identical to another object.
        self.assertIs(None, None)
        some_list = [42]
        self.assertIs(some_list, some_list)
        some_object = object()
        self.assertIs(some_object, some_object)
        marker = object()
        value = getattr(self, 'doesntexist', marker)
        self.assertIs(marker, value)
 
 
    def test_returns_wrapped(self):
        # Calling Nullary returns whatever the function returns.
        ret = object()
        wrapped = Nullary(lambda: ret)
        self.assertIs(ret, wrapped())

src/z/o/zope_fixtures-0.0.3/lib/zope_fixtures/tests/test_components.py   zope_fixtures(Download)
        original_registry = getSiteManager()
        self.useFixture(fixture)
        self.assertIs(fixture.registry, getSiteManager())
        self.assertIn(original_registry, fixture.registry.__bases__)
 
    def test_restores_site_manager(self):
        fixture = ComponentsFixture()
        original_registry = getSiteManager()
        with fixture:
            self.assertIs(fixture.registry, getSiteManager())
        with fixture:
            self.assertIs(fixture.registry, getSiteManager())
        self.assertIs(original_registry, getSiteManager())
 
    def test_provide_utility_against_fixture_registry(self):
        utility = TestUtility()
        fixture.registry.registerUtility(utility)
        self.assertIs(utility, queryUtility(ITestUtility))
        self.assertIs(utility, fixture.registry.queryUtility(ITestUtility))
        self.assertIs(None, original_registry.queryUtility(ITestUtility))

src/h/e/heat-HEAD/heat/tests/test_properties.py   heat(Download)
    def test_boolean_true(self):
        p = properties.Property({'Type': 'Boolean'})
        self.assertIs(True, p.validate_data('True'))
        self.assertIs(True, p.validate_data('true'))
        self.assertIs(True, p.validate_data(True))
 
    def test_boolean_false(self):
        p = properties.Property({'Type': 'Boolean'})
        self.assertIs(False, p.validate_data('False'))
        self.assertIs(False, p.validate_data('false'))

src/t/r/trove-HEAD/trove/tests/unittests/taskmanager/test_models.py   trove(Download)
            # verify
            self.assertTrue(self.stub_server_mgr.get.called)
            self.assertIs(self.instance_task.server,
                          self.stub_verifying_server)
            self.instance_task._guest.stop_db.assert_any_call(

src/s/s/sst-0.2.4/src/sst/tests/test_command.py   sst(Download)
    def test_default_values(self):
        opts, args = self.parse_args([])
        self.assertEqual(1, opts.concurrency)
        self.assertIs(None, opts.excludes)
        self.assertEqual([], args)
 
    def test_single_regexp(self):
        opts, args = self.parse_args(['foo'])
        self.assertEquals(['foo'], args)
        self.assertIs(None, opts.excludes)
    def test_multiple_regexps(self):
        opts, args = self.parse_args(
            ['foo', 'bar', 'baz'])
        self.assertEquals(['foo', 'bar', 'baz'], args)
        self.assertIs(None, opts.excludes)

src/r/a/rabbitfixture-0.3.4/rabbitfixture/tests/test_server.py   rabbitfixture(Download)
    def test_config(self):
        # The configuration can be passed in.
        config = RabbitServerResources()
        fixture = self.useFixture(RabbitServer(config))
        self.assertIs(config, fixture.config)
        self.assertIs(config, fixture.runner.config)
        self.assertIs(config, fixture.runner.environment.config)

src/t/e/testtools-0.9.35/testtools/tests/test_compat.py   testtools(Download)
        sout.encoding = "utf-8"
        uout = unicode_output_stream(sout)
        self.assertIs(uout, sout)
 
    def test_stringio(self):
        except ValueError:
            _new_exc_info = sys.exc_info()
        self.assertIs(_exc_info[0], _new_exc_info[0])
        self.assertIs(_exc_info[1], _new_exc_info[1])
        expected_tb = traceback.extract_tb(_exc_info[2])

src/t/e/testtools-HEAD/testtools/tests/test_compat.py   testtools(Download)
        sout.encoding = "utf-8"
        uout = unicode_output_stream(sout)
        self.assertIs(uout, sout)
 
    def test_stringio(self):
        except ValueError:
            _new_exc_info = sys.exc_info()
        self.assertIs(_exc_info[0], _new_exc_info[0])
        self.assertIs(_exc_info[1], _new_exc_info[1])
        expected_tb = traceback.extract_tb(_exc_info[2])

src/t/x/txpkgme-0.3/txpkgme/tests/test_reports.py   txpkgme(Download)
    def test_no_error(self):
        self.assertIs(None, map_error({'error': {}}))
        self.assertIs(None, map_error({}))
        self.assertIs(None, map_error({'other-data': {}}))
 
    def test_no_error(self):
        backend = guess_backend(None)
        self.assertIs(None, backend)
 
    def test_unrecognized_string(self):
        backend = guess_backend(self.getUniqueString())
        self.assertIs(None, backend)

  1 | 2 | 3 | 4  Next