[Bugs] #1438 UNSP: add test suite

Sugar Labs Bugs bugtracker-noreply at sugarlabs.org
Sun Dec 20 07:30:05 EST 2009


#1438: add test suite
------------------------------------------+---------------------------------
    Reporter:  sascha_silbe               |          Owner:  sascha_silbe               
        Type:  enhancement                |         Status:  accepted                   
    Priority:  Unspecified by Maintainer  |      Milestone:  Unspecified by Release Team
   Component:  sugar-datastore            |        Version:  Git as of bugdate          
    Severity:  Unspecified                |       Keywords:  r!                         
Distribution:  Unspecified                |   Status_field:  Unconfirmed                
------------------------------------------+---------------------------------
Changes (by alsroot):

  * keywords:  r? => r!


Comment:

 I got these errors after applying #1437 and #1342

 {{{
 Doctest: basic_api.txt ... FAIL
 ERROR
 Run create() lots of times. ... ok (2.826s)
 Run find() to list all entries lots of times. ... ok (1.163s)
 Run get_filename() on all entries and verify content. ... ok (0.106s)
 Run get_properties() on all entries and verify it. ... FAIL
 Update the content of all existing entries ... ok (1.501s)
 Verify test_update() has changed the content of all entries. ... ok
 (0.108s)
 ERROR

 ======================================================================
 ERROR: runTest (__main__.TestSuiteWrapper)
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/home/sugar/src/git/datastore/tests/runalltests.py", line 120, in
 run
     self.tearDown()
   File "/home/sugar/src/git/datastore/tests/runalltests.py", line 138, in
 tearDown
     assert (not datastore.find({}, ['uid'], byte_arrays=True))
 AssertionError

 ======================================================================
 ERROR: runTest (__main__.TestSuiteWrapper)
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/home/sugar/src/git/datastore/tests/runalltests.py", line 120, in
 run
     self.tearDown()
   File "/home/sugar/src/git/datastore/tests/runalltests.py", line 138, in
 tearDown
     assert (not datastore.find({}, ['uid'], byte_arrays=True))
 AssertionError

 ======================================================================
 FAIL: Doctest: basic_api.txt
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/usr/lib64/python2.6/doctest.py", line 2145, in runTest
     raise self.failureException(self.format_failure(new.getvalue()))
 AssertionError: Failed doctest test for basic_api.txt
   File "/home/sugar/src/git/datastore/tests/basic_api.txt", line 0

 ----------------------------------------------------------------------
 File "/home/sugar/src/git/datastore/tests/basic_api.txt", line 61, in
 basic_api.txt
 Failed example:
     d
 Expected:
     {dbus.String(u'title'): dbus.ByteArray('DS test object 2',
 variant_level=1), dbus.String(u'mime_type'): dbus.ByteArray('text/html',
 variant_level=1), dbus.String(u'activity'):
 dbus.ByteArray('org.sugarlabs.DataStoreTest3', variant_level=1)}
 Got:
     {dbus.String(u'activity'):
 dbus.ByteArray('org.sugarlabs.DataStoreTest3', variant_level=1),
 dbus.String(u'mime_type'): dbus.ByteArray('text/html', variant_level=1),
 dbus.String(u'title'): dbus.ByteArray('DS test object 2',
 variant_level=1)}


 ======================================================================
 FAIL: Run get_properties() on all entries and verify it.
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/home/sugar/src/git/datastore/tests/test_massops.py", line 59, in
 test_get_properties
     assert (properties == self._create_properties)
 AssertionError

 ----------------------------------------------------------------------
 Ran 9 tests in 6.473s

 FAILED (failures=2, errors=2)
 }}}

 Does test requires some preparation in environment or just `make check`?

-- 
Ticket URL: <http://bugs.sugarlabs.org/ticket/1438#comment:3>
Sugar Labs <http://sugarlabs.org/>
Sugar Labs bug tracking system


More information about the Bugs mailing list