Projet

Général

Profil

0005-tests-only-truncate-if-table-exists-60552.patch

Frédéric Péters, 25 mars 2022 14:53

Télécharger (936 octets)

Voir les différences:

Subject: [PATCH 5/9] tests: only truncate if table exists (#60552)

This allows for test_select_any_formdata and others to pass without
relying on previous tests.
 tests/test_sql.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
tests/test_sql.py
1315 1315
    for table_name in table_names:
1316 1316
        if table_name.startswith('formdata_'):
1317 1317
            cur.execute('DROP TABLE %s CASCADE' % table_name)
1318
    cur.execute('TRUNCATE wcs_all_forms;')
1318
    if 'wcs_all_forms' in table_names:
1319
        cur.execute('TRUNCATE wcs_all_forms;')
1319 1320

  
1320 1321

  
1321 1322
def test_is_at_endpoint(pub):
1322
-