コード例 #1
0
 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, FILENAME, report)
     assert len(report.raised_warnings) == 1
     assert report.raised_warnings[0].check_name == "check_duplicate_rows"
コード例 #2
0
 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, FILENAME, report)
     assert len(report.raised_warnings) == 0