Skip to content

Instantly share code, notes, and snippets.

@davidwtbuxton
Created November 9, 2017 17:33
Show Gist options
  • Save davidwtbuxton/5eb20ae04c33012b2452b4d225952888 to your computer and use it in GitHub Desktop.
Save davidwtbuxton/5eb20ae04c33012b2452b4d225952888 to your computer and use it in GitHub Desktop.
More test output for 958-computed-field-pagination
(djangae) $ git log HEAD~1..
commit 74bee22fc276276af6dc82db9dc6b933a0d2e6b0 (HEAD -> 958-computed-field-pagination, upstream/958-computed-field-pagination)
Author: Phil Tysoe
Date: Thu Nov 9 17:11:29 2017 +0000
Fix 16 bit max signed int value
(djangae) $ ./runtests.sh
Not running install_deps. Pass --install_deps if you want to install dependencies.
Creating test database for alias 'default'...
..................x..........................x............x.....x.......................................x.....................xs.......x.x.....s........x...........x.......................................x........x.........x........................x.....x............................x........x...xx..........x........x...............................x..............................s.s......................................x....................x.......E...............s..x.................x....x.....x....x...........................x.sx.......s......x...x......x..x.....................x................................x............x.x.....................x..............x....s........x.x...............x............................x..........s............................................x................s.....sx...................................................................x.....s.....x........x..............s.............x.........................x..x....
======================================================================
ERROR: test_negatives (djangae.contrib.pagination.tests.ComputedIntegerFieldPaginationTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/djangae/testapp/djangae/contrib/pagination/tests.py", line 275, in test_negatives
obj = ComputedIntegerFieldModel.objects.create(count=i)
File "/djangae/testapp/libs/django/db/models/manager.py", line 127, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/djangae/testapp/libs/django/db/models/query.py", line 348, in create
obj.save(force_insert=True, using=self.db)
File "/djangae/testapp/libs/django/db/models/base.py", line 734, in save
force_update=force_update, update_fields=update_fields)
File "/djangae/testapp/libs/django/db/models/base.py", line 762, in save_base
updated = self._save_table(raw, cls, force_insert, force_update, using, update_fields)
File "/djangae/testapp/libs/django/db/models/base.py", line 846, in _save_table
result = self._do_insert(cls._base_manager, using, fields, update_pk, raw)
File "/djangae/testapp/libs/django/db/models/base.py", line 885, in _do_insert
using=using, raw=raw)
File "/djangae/testapp/libs/django/db/models/manager.py", line 127, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/djangae/testapp/libs/django/db/models/query.py", line 920, in _insert
return query.get_compiler(using=using).execute_sql(return_id)
File "/djangae/testapp/libs/django/db/models/sql/compiler.py", line 973, in execute_sql
for sql, params in self.as_sql():
File "/djangae/testapp/djangae/db/backends/appengine/compiler.py", line 68, in as_sql
self.query.raw), tuple())
File "/djangae/testapp/djangae/db/backends/appengine/commands.py", line 643, in __init__
getattr(obj, field.attname) if raw else field.pre_save(obj, True),
File "/djangae/testapp/djangae/fields/computed.py", line 13, in pre_save
value = self.get_computed_value(model_instance)
File "/djangae/testapp/djangae/fields/computed.py", line 31, in get_computed_value
return self.computer(model_instance)
File "/djangae/testapp/djangae/contrib/pagination/decorators.py", line 24, in generator
value = convert_to_paginatable_value(value, neg)
File "/djangae/testapp/djangae/contrib/pagination/decorators.py", line 55, in convert_to_paginatable_value
value = u''.join([unichr(int(i)) for i in _chunks(str(value), n=5)])
ValueError: unichr() arg not in range(0x10000) (narrow Python build)
----------------------------------------------------------------------
Ran 963 tests in 382.386s
FAILED (errors=1, skipped=13, expected failures=53)
Destroying test database for alias 'default'...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment