Tryton - Issues

 

Message46768

Author dave
Recipients
Date 2019-02-06.12:42:23
Content
When running particular sets of module tests togethor using run-test.py the tests fail with "TypeError: unorderable types: datetime.datetime() > str()".

This always seems to happen here: http://hg.tryton.org/trytond/file/tip/trytond/cache.py#l134
both timestamp and inst_timestamp appear to be the same timestamp, but of different types:
    timestamp: datetime.datetime(2019, 2, 6, 11, 38, 50, 673473)
    inst_timestamp: '2019-02-06 11:38:50.673473'


Here are two examples using different sets of modules:

$ ./trytond/trytond/tests/run-tests.py -f -v -m account_statement account_statement_aeb43 account_statement_coda account_statement_ofx stock_package_shipping_dpd stock_package_shipping_ups
/home/tryton/tryton-env/trytond/trytond/backend/sqlite/table.py:309: UserWarning: Unable to remove not null with SQLite backend
  warnings.warn('Unable to remove not null with SQLite backend')
/home/tryton/tryton-env/trytond/trytond/backend/sqlite/table.py:244: UserWarning: Unable to drop foreign key with SQLite backend
  warnings.warn('Unable to drop foreign key with SQLite backend')
/home/tryton/tryton-env/trytond/trytond/backend/sqlite/table.py:314: UserWarning: Unable to add constraint with SQLite backend
  warnings.warn('Unable to add constraint with SQLite backend')
/home/tryton/tryton-env/trytond/trytond/backend/sqlite/table.py:307: UserWarning: Unable to set not null with SQLite backend
  warnings.warn('Unable to set not null with SQLite backend')
/home/tryton/tryton-env/trytond/trytond/backend/sqlite/table.py:175: UserWarning: Unable to set default on column with SQLite backend
  warnings.warn('Unable to set default on column with SQLite backend')
/home/tryton/tryton-env/trytond/trytond/backend/sqlite/table.py:241: UserWarning: Unable to add foreign key with SQLite backend
  warnings.warn('Unable to add foreign key with SQLite backend')
/home/tryton/tryton-env/trytond/trytond/backend/sqlite/table.py:317: UserWarning: Unable to drop constraint with SQLite backend
  warnings.warn('Unable to drop constraint with SQLite backend')
/home/tryton/tryton-env/trytond/trytond/backend/sqlite/table.py:283: UserWarning: Unable to create index with parameters
  warnings.warn('Unable to create index with parameters')
................................................................F
======================================================================
FAIL: /home/tryton/tryton-env/trytond/trytond/modules/account_statement_ofx/tests/scenario_account_statement_ofx.rst
Doctest: scenario_account_statement_ofx.rst
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.5/doctest.py", line 2190, in runTest
    raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for scenario_account_statement_ofx.rst
  File "/home/tryton/tryton-env/trytond/trytond/modules/account_statement_ofx/tests/scenario_account_statement_ofx.rst", line 0

----------------------------------------------------------------------
File "/home/tryton/tryton-env/trytond/trytond/modules/account_statement_ofx/tests/scenario_account_statement_ofx.rst", line 18, in scenario_account_statement_ofx.rst
Failed example:
    config = activate_modules('account_statement_ofx')
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib/python3.5/doctest.py", line 1321, in __run
        compileflags, 1), test.globs)
      File "<doctest scenario_account_statement_ofx.rst[6]>", line 1, in <module>
        config = activate_modules('account_statement_ofx')
      File "/home/tryton/tryton-env/trytond/trytond/tests/tools.py", line 25, in activate_modules
        Wizard('ir.module.activate_upgrade').execute('upgrade')
      File "/home/tryton/tryton-env/proteus/proteus/__init__.py", line 1175, in execute
        view['fields_view']['model'], self._config)()
      File "/home/tryton/tryton-env/proteus/proteus/__init__.py", line 727, in get
        class Spam(Model, metaclass=MetaModelFactory(name, config=config)()):
      File "/home/tryton/tryton-env/proteus/proteus/__init__.py", line 458, in __new__
        dict['_fields'] = proxy.fields_get(None, context)
      File "/home/tryton/tryton-env/proteus/proteus/config.py", line 175, in __call__
        self._config.user, readonly=rpc.readonly) as transaction:
      File "/home/tryton/tryton-env/trytond/trytond/transaction.py", line 111, in start
        Cache.sync(self)
      File "/home/tryton/tryton-env/trytond/trytond/cache.py", line 134, in sync
        if not inst_timestamp or timestamp > inst_timestamp:
    TypeError: unorderable types: datetime.datetime() > str()


----------------------------------------------------------------------
Ran 65 tests in 301.670s

FAILED (failures=1)




$ ./trytond/trytond/tests/run-tests.py -f -v -m product product_attribute product_cost_fifo stock stock_lot stock_split
/home/tryton/tryton-env/trytond/trytond/backend/sqlite/table.py:309: UserWarning: Unable to remove not null with SQLite backend
  warnings.warn('Unable to remove not null with SQLite backend')
/home/tryton/tryton-env/trytond/trytond/backend/sqlite/table.py:244: UserWarning: Unable to drop foreign key with SQLite backend
  warnings.warn('Unable to drop foreign key with SQLite backend')
/home/tryton/tryton-env/trytond/trytond/backend/sqlite/table.py:314: UserWarning: Unable to add constraint with SQLite backend
  warnings.warn('Unable to add constraint with SQLite backend')
/home/tryton/tryton-env/trytond/trytond/backend/sqlite/table.py:307: UserWarning: Unable to set not null with SQLite backend
  warnings.warn('Unable to set not null with SQLite backend')
/home/tryton/tryton-env/trytond/trytond/backend/sqlite/table.py:175: UserWarning: Unable to set default on column with SQLite backend
  warnings.warn('Unable to set default on column with SQLite backend')
/home/tryton/tryton-env/trytond/trytond/backend/sqlite/table.py:241: UserWarning: Unable to add foreign key with SQLite backend
  warnings.warn('Unable to add foreign key with SQLite backend')
/home/tryton/tryton-env/trytond/trytond/backend/sqlite/table.py:317: UserWarning: Unable to drop constraint with SQLite backend
  warnings.warn('Unable to drop constraint with SQLite backend')
/home/tryton/tryton-env/trytond/trytond/backend/sqlite/table.py:283: UserWarning: Unable to create index with parameters
  warnings.warn('Unable to create index with parameters')
................................................................................F
======================================================================
FAIL: /home/tryton/tryton-env/trytond/trytond/modules/stock/tests/scenario_stock_shipment_out_return_same_storage_input.rst
Doctest: scenario_stock_shipment_out_return_same_storage_input.rst
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.5/doctest.py", line 2190, in runTest
    raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for scenario_stock_shipment_out_return_same_storage_input.rst
  File "/home/tryton/tryton-env/trytond/trytond/modules/stock/tests/scenario_stock_shipment_out_return_same_storage_input.rst", line 0

----------------------------------------------------------------------
File "/home/tryton/tryton-env/trytond/trytond/modules/stock/tests/scenario_stock_shipment_out_return_same_storage_input.rst", line 15, in scenario_stock_shipment_out_return_same_storage_input.rst
Failed example:
    config = activate_modules('stock')
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib/python3.5/doctest.py", line 1321, in __run
        compileflags, 1), test.globs)
      File "<doctest scenario_stock_shipment_out_return_same_storage_input.rst[4]>", line 1, in <module>
        config = activate_modules('stock')
      File "/home/tryton/tryton-env/trytond/trytond/tests/tools.py", line 18, in activate_modules
        cfg = _get_config()
      File "/home/tryton/tryton-env/trytond/trytond/tests/tools.py", line 32, in _get_config
        cfg = pconfig.set_trytond()
      File "/home/tryton/tryton-env/proteus/proteus/config.py", line 286, in set_trytond
        _CONFIG.current = TrytondConfig(database, user, config_file=config_file)
      File "/home/tryton/tryton-env/proteus/proteus/config.py", line 241, in __init__
        with Transaction().start(self.database_name, 0) as transaction:
      File "/home/tryton/tryton-env/trytond/trytond/transaction.py", line 111, in start
        Cache.sync(self)
      File "/home/tryton/tryton-env/trytond/trytond/cache.py", line 134, in sync
        if not inst_timestamp or timestamp > inst_timestamp:
    TypeError: unorderable types: datetime.datetime() > str()


----------------------------------------------------------------------
Ran 81 tests in 298.256s

FAILED (failures=1)
History
Date User Action Args
2019-02-06 12:42:24davesetmessageid: <1549453344.2.0.160791231217.issue8080@tryton.org>
2019-02-06 12:42:24davelinkissue8080 messages
2019-02-06 12:42:23davecreate

Showing 10 items. Show all history (warning: this could be VERY long)