Skip to content

Commit

Permalink
fix: flaky test closes tobymao#3961
Browse files Browse the repository at this point in the history
  • Loading branch information
tobymao committed Aug 23, 2024
1 parent 8cf282b commit 42b725e
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions tests/test_generator.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import time
import unittest

from sqlglot import exp, parse_one
Expand Down Expand Up @@ -46,8 +45,5 @@ def test_identify(self):
assert parse_one("X as 1").sql(identify="safe") == 'X AS "1"'

def test_generate_nested_binary(self):
sql = "SELECT 'foo'" + (" || 'foo'" * 500)

now = time.time()
self.assertEqual(parse_one(sql).sql(), sql)
self.assertLessEqual(time.time() - now, 0.1)
sql = "SELECT 'foo'" + (" || 'foo'" * 1000)
self.assertEqual(parse_one(sql).sql(copy=False), sql)

0 comments on commit 42b725e

Please sign in to comment.