Skip to content

Commit 8595060

Browse files
committed
PLAT-928 -- Add tests for alternative separator.
1 parent 42ac804 commit 8595060

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

test/endtoend/test_example.py

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,37 @@ def test_ignores(uri_left, uri_right):
317317
assert result.is_match
318318

319319

320+
@pytest.mark.usefixtures("new_db_left")
321+
@pytest.mark.usefixtures("new_db_right")
322+
def test_ignores_alternative_sep(uri_left, uri_right):
323+
# functionally the same of `test_errors_dict_catches_all_differences`
324+
# but all errors are silenced with ignores
325+
prepare_schema_from_models(uri_left, Base_left)
326+
prepare_schema_from_models(uri_right, Base_right)
327+
328+
ignores = [
329+
'mobile_numbers',
330+
'phone_numbers',
331+
'companies#col#name',
332+
'companies#idx#name',
333+
'employees#fk#fk_employees_companies',
334+
'employees#fk#fk_emp_comp',
335+
'employees#idx#ix_employees_name',
336+
'employees#idx#fk_employees_companies',
337+
'employees#idx#name',
338+
'employees#idx#fk_emp_comp',
339+
'roles#col#name',
340+
'skills#col#slug',
341+
'skills#col#id',
342+
'skills#pk#slug',
343+
'skills#pk#id',
344+
]
345+
346+
result = compare(uri_left, uri_right, ignores=ignores, ignores_sep='#')
347+
348+
assert result.is_match
349+
350+
320351
@pytest.mark.usefixtures("new_db_left")
321352
@pytest.mark.usefixtures("new_db_right")
322353
@pytest.mark.parametrize('missing_ignore', [

0 commit comments

Comments
 (0)