Get a better error when check_copies fails (#7457)

* Get a better error when check_copies fails

* Fix tests
This commit is contained in:
Sylvain Gugger
2020-09-30 04:05:14 -04:00
committed by GitHub
parent bef0175168
commit 4ba248748f
2 changed files with 8 additions and 9 deletions

View File

@@ -55,7 +55,7 @@ class CopyCheckTester(unittest.TestCase):
with open(fname, "w") as f:
f.write(code)
if overwrite_result is None:
self.assertTrue(check_copies.is_copy_consistent(fname))
self.assertTrue(len(check_copies.is_copy_consistent(fname)) == 0)
else:
check_copies.is_copy_consistent(f.name, overwrite=True)
with open(fname, "r") as f: