def test_more_than_two_copies(self):
     validator = StaticValidator(self.params)
     report = ValidationReport([])
     df = pd.DataFrame([["a", "1"], ["b", "2"], ["b", "2"], ["b", "2"]])
     validator.check_duplicate_rows(df, "file", report)
     assert len(report.raised_warnings) == 1
     assert report.raised_warnings[0].expression == [2, 3]
 def test_non_consecutive_duplicates(self):
     validator = StaticValidator(self.params)
     report = ValidationReport([])
     df = pd.DataFrame([["a", "1"], ["b", "2"], ["a", "1"]])
     validator.check_duplicate_rows(df, "file", report)
     assert len(report.raised_warnings) == 1
     assert report.raised_warnings[0].expression == [2]
     assert report.raised_warnings[0].check_data_id[1] == "file"
 def test_single_column_duplicates_but_not_row(self):
     validator = StaticValidator(self.params)
     report = ValidationReport([])
     df = pd.DataFrame([["a", "1"], ["a", "2"], ["b", "2"]])
     validator.check_duplicate_rows(df, "file", report)
     assert len(report.raised_warnings) == 0