'Introspection errors should not crash the command, and the error should
be visible in the output.'

def test_introspection_errors(self):

    out = StringIO()
    with mock.patch('django.db.backends.base.introspection.BaseDatabaseIntrospection.table_names', return_value=['nonexistent']):
        call_command('inspectdb', stdout=out)
    output = out.getvalue()
    self.assertIn("#    Unable    to    inspect    table    'nonexistent'", output)
    self.assertIn('#    The    error    was:', output)
