)]}'
{"test/unit/obj/test_diskfile.py":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"d37646498ab93826ceaa51824b11f806870d3a0e","unresolved":false,"context_lines":[{"line_number":6228,"context_line":"            self.assertEqual(hashes, {})"},{"line_number":6229,"context_line":"            self.assertFalse(os.path.exists(df._datadir))"},{"line_number":6230,"context_line":""},{"line_number":6231,"context_line":"            hash_timestamp \u003d os.stat(hash_file).st_mtime"},{"line_number":6232,"context_line":""},{"line_number":6233,"context_line":"            # if hash.pkl exists, that .ts file is not reclaimed"},{"line_number":6234,"context_line":"            df \u003d df_mgr.get_diskfile("}],"source_content_type":"text/x-python","patch_set":2,"id":"5a74a57a_b5be3cd2","side":"PARENT","line":6231,"updated":"2016-11-24 19:16:48.000000000","message":"we lost all these assertions on the mtime of hashes.pkl","commit_id":"0873b7c03eddfa02c883a8b553abc6f2d5a26b1f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"d37646498ab93826ceaa51824b11f806870d3a0e","unresolved":false,"context_lines":[{"line_number":6230,"context_line":""},{"line_number":6231,"context_line":"            hash_timestamp \u003d os.stat(hash_file).st_mtime"},{"line_number":6232,"context_line":""},{"line_number":6233,"context_line":"            # if hash.pkl exists, that .ts file is not reclaimed"},{"line_number":6234,"context_line":"            df \u003d df_mgr.get_diskfile("},{"line_number":6235,"context_line":"                \u0027sda1\u0027, \u00270\u0027, \u0027a\u0027, \u0027c\u0027, \u0027o\u0027, policy\u003dpolicy)"},{"line_number":6236,"context_line":"            df.delete(timestamp.internal)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a74a57a_cab79384","side":"PARENT","line":6233,"updated":"2016-11-24 19:16:48.000000000","message":"this is asserting the bug :/","commit_id":"0873b7c03eddfa02c883a8b553abc6f2d5a26b1f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"d37646498ab93826ceaa51824b11f806870d3a0e","unresolved":false,"context_lines":[{"line_number":6030,"context_line":"            self.assertFalse(os.path.exists(hashes_file))"},{"line_number":6031,"context_line":"            self.assertFalse(os.path.exists(inv_file))"},{"line_number":6032,"context_line":""},{"line_number":6033,"context_line":"    def test_delete_when_empty_pkl(self):"},{"line_number":6034,"context_line":"        for policy in self.iter_policies():"},{"line_number":6035,"context_line":"            df_mgr \u003d self.df_router[policy]"},{"line_number":6036,"context_line":"            hashes \u003d df_mgr.get_hashes(\u0027sda1\u0027, \u00270\u0027, [], policy)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a74a57a_e7ce4ab3","line":6033,"updated":"2016-11-24 19:16:48.000000000","message":"nit: would prefer the test name to reflect the pattern of the other tests e.g. test_invalidate_hash_empty_file_exists\n\nok. this test almost duplicate lines 6073-6082 but in fact the first call to get_hashes creates an empty pkl file, so the starting state for the delete is different.\n\nmight be worth a comment","commit_id":"b0d158192018b30088190cef3ae666ac65059851"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"d37646498ab93826ceaa51824b11f806870d3a0e","unresolved":false,"context_lines":[{"line_number":6056,"context_line":"                                          policy\u003dpolicy)"},{"line_number":6057,"context_line":"                i +\u003d 1"},{"line_number":6058,"context_line":"                if df._datadir !\u003d df2._datadir:"},{"line_number":6059,"context_line":"                    break"},{"line_number":6060,"context_line":"            df.delete(self.ts())"},{"line_number":6061,"context_line":"            suffix_dir \u003d os.path.dirname(df._datadir)"},{"line_number":6062,"context_line":"            suffix \u003d os.path.basename(suffix_dir)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a74a57a_c7aceea2","line":6059,"updated":"2016-11-24 19:16:48.000000000","message":"I guess what you\u0027re trying to achieve is a second diskfile in different suffix dir. This condition is not sufficient because df._datadir includes the object path hash, so the two datadirs will always be different.\n\nIt needs to compare the suffix dirs","commit_id":"b0d158192018b30088190cef3ae666ac65059851"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"d37646498ab93826ceaa51824b11f806870d3a0e","unresolved":false,"context_lines":[{"line_number":6061,"context_line":"            suffix_dir \u003d os.path.dirname(df._datadir)"},{"line_number":6062,"context_line":"            suffix \u003d os.path.basename(suffix_dir)"},{"line_number":6063,"context_line":"            hashes \u003d df_mgr.get_hashes(\u0027sda1\u0027, \u00270\u0027, [], policy)"},{"line_number":6064,"context_line":"            self.assertIn(suffix, hashes)  # sanity"},{"line_number":6065,"context_line":""},{"line_number":6066,"context_line":"            df2.delete(self.ts())"},{"line_number":6067,"context_line":"            suffix_dir \u003d os.path.dirname(df2._datadir)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a74a57a_f5451417","line":6064,"updated":"2016-11-24 19:16:48.000000000","message":"It would be good to have some more assertions here w.r.t. the state of hashes.pkl and invalidation files, similar to those in test_invalidate_hash_file_exists\n\nin fact, I think the two tests could be combined to re-use some of the setup and repeated assertions - see my follow up patch","commit_id":"b0d158192018b30088190cef3ae666ac65059851"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"d37646498ab93826ceaa51824b11f806870d3a0e","unresolved":false,"context_lines":[{"line_number":6260,"context_line":"            old_time \u003d time() - 500"},{"line_number":6261,"context_line":"            timestamp \u003d Timestamp(old_time)"},{"line_number":6262,"context_line":"            df.delete(timestamp.internal)"},{"line_number":6263,"context_line":"            hashes \u003d df_mgr.get_hashes(\u0027sda1\u0027, \u00270\u0027, [], policy)"},{"line_number":6264,"context_line":""},{"line_number":6265,"context_line":"            # we have tombstone entry"},{"line_number":6266,"context_line":"            tombstone \u003d \u0027%s.ts\u0027 % timestamp.internal"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a74a57a_aa997721","line":6263,"updated":"2016-11-24 19:16:48.000000000","message":"hashes is not used before redeclaration, but I think it would be good to add some assertions about hashes - see my follow up patch","commit_id":"b0d158192018b30088190cef3ae666ac65059851"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"d37646498ab93826ceaa51824b11f806870d3a0e","unresolved":false,"context_lines":[{"line_number":6282,"context_line":"            self.assertEqual(hashes, {})"},{"line_number":6283,"context_line":"            self.assertFalse(os.path.exists(df._datadir))"},{"line_number":6284,"context_line":""},{"line_number":6285,"context_line":"    def test_hash_suffix_ts_cleanup_after_invalidate_hash(self):"},{"line_number":6286,"context_line":"        for policy in self.iter_policies():"},{"line_number":6287,"context_line":"            df_mgr \u003d self.df_router[policy]"},{"line_number":6288,"context_line":"            df \u003d df_mgr.get_diskfile("}],"source_content_type":"text/x-python","patch_set":2,"id":"5a74a57a_6a559f1b","line":6285,"updated":"2016-11-24 19:16:48.000000000","message":"+1 for splitting up the test; its clearer to have two separate tests for the two routes to the suffix being invalidated, despite being a little repetitive","commit_id":"b0d158192018b30088190cef3ae666ac65059851"}]}
