mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-10-27 20:44:07 +00:00
(core) Two fixes to tests affected by changes that came from grist-core.
Summary: - For python2, skip some tests of renaming which produce different results because of an un-upgradable astroid version. - Fix test affected by pyCall() having changed to async; avoid hanging timeout callback in case of error. Test Plan: All test cases should now pass (with 4 getting skipped) Reviewers: paulfitz Reviewed By: paulfitz Differential Revision: https://phab.getgrist.com/D3819
This commit is contained in:
parent
86681de595
commit
efd92c6c2a
@ -229,9 +229,11 @@ export class NSandbox implements ISandbox {
|
||||
// (or just benign if the doc is big).
|
||||
log.rawWarn('Slow pyCall', {...this._logMeta, funcName});
|
||||
}, 10000);
|
||||
const result = await this._pyCallWait(funcName, startTime);
|
||||
clearTimeout(slowCallCheck);
|
||||
return result;
|
||||
try {
|
||||
return await this._pyCallWait(funcName, startTime);
|
||||
} finally {
|
||||
clearTimeout(slowCallCheck);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1,6 +1,8 @@
|
||||
import textwrap
|
||||
import logger
|
||||
import unittest
|
||||
|
||||
import logger
|
||||
import six
|
||||
import test_engine
|
||||
|
||||
log = logger.Logger(__name__, logger.INFO)
|
||||
@ -187,6 +189,7 @@ class TestRenames2(test_engine.EngineTestCase):
|
||||
self.assertTableData("Games", cols="subset", data=self.games_data)
|
||||
|
||||
|
||||
@unittest.skipUnless(six.PY3, "Python 3 only")
|
||||
def test_renames_b(self):
|
||||
# Rename Games.name: affects People.Games_Won, Games.win4_game_name
|
||||
out_actions = self.apply_user_action(["RenameColumn", "Games", "name", "nombre"])
|
||||
@ -260,6 +263,7 @@ class TestRenames2(test_engine.EngineTestCase):
|
||||
self.assertTableData("Games", cols="subset", data=self.games_data)
|
||||
|
||||
|
||||
@unittest.skipUnless(six.PY3, "Python 3 only")
|
||||
def test_renames_d(self):
|
||||
# Rename People.name: affects People.N, People.ParnerNames
|
||||
# TODO: PartnerNames does NOT get updated correctly because astroid doesn't infer meanings of
|
||||
@ -288,6 +292,7 @@ class TestRenames2(test_engine.EngineTestCase):
|
||||
self.assertTableData("Games", cols="subset", data=self.games_data)
|
||||
|
||||
|
||||
@unittest.skipUnless(six.PY3, "Python 3 only")
|
||||
def test_renames_e(self):
|
||||
# Rename People.partner: affects People.partner4
|
||||
# TODO: partner4 ($partner.partner.partner.partner) only gets updated partly because of
|
||||
@ -309,6 +314,7 @@ class TestRenames2(test_engine.EngineTestCase):
|
||||
self.assertTableData("Games", cols="subset", data=self.games_data)
|
||||
|
||||
|
||||
@unittest.skipUnless(six.PY3, "Python 3 only")
|
||||
def test_renames_f(self):
|
||||
# Rename People.win -> People.pwin. Make sure only Game.win is not affected.
|
||||
out_actions = self.apply_user_action(["RenameColumn", "People", "win", "pwin"])
|
||||
|
Loading…
Reference in New Issue
Block a user