diff --git a/app/server/lib/NSandbox.ts b/app/server/lib/NSandbox.ts index 35e09ae1..eb219d88 100644 --- a/app/server/lib/NSandbox.ts +++ b/app/server/lib/NSandbox.ts @@ -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); + } } /** diff --git a/sandbox/grist/test_renames2.py b/sandbox/grist/test_renames2.py index d453297f..b57e2aba 100644 --- a/sandbox/grist/test_renames2.py +++ b/sandbox/grist/test_renames2.py @@ -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"])