robert$ ./test_for_students.py **************************************** 1. This should print an error (or usage) message: Usage: sync directory1 directory2 **************************************** **************************************** 2. This should show both dir1 and dir2 as directories: dir1 dir2 **************************************** **************************************** 3. This should show sync file contents: { "file1_1.txt": [ [ "2015-08-31 13:25:55 +1200", "a2ebea1d55e6059dfb7b8e8354e0233d501da9d968ad3686c49d6a443b9520a8" ] ] } **************************************** **************************************** 4. This should show two different sync files: { "file1_1.txt": [ [ "2015-08-31 13:25:55 +1200", "a2ebea1d55e6059dfb7b8e8354e0233d501da9d968ad3686c49d6a443b9520a8" ] ] } { "file1_1.txt": [ [ "2015-08-31 13:25:55 +1200", "7216f4359fa78ea080f5d6ee2c13f7c2229beba4111fa339f516e3de51f4a21d" ], [ "2015-08-31 13:25:55 +1200", "a2ebea1d55e6059dfb7b8e8354e0233d501da9d968ad3686c49d6a443b9520a8" ] ] } **************************************** **************************************** 5. This should show two matching directories: -a.txt 64 2015-08-31 13:25:56 +1200 -b.txt 63 2015-08-31 13:25:56 +1200 -c.txt 63 2015-08-31 13:25:56 +1200 -a.txt 64 2015-08-31 13:25:56 +1200 -b.txt 63 2015-08-31 13:25:56 +1200 -c.txt 63 2015-08-31 13:25:56 +1200 **************************************** **************************************** 6. This should show two matching directories with the file 'a.txt' 75 bytes long and the modification time > 1 second later: -a.txt 75 2015-08-31 13:25:58 +1200 -b.txt 63 2015-08-31 13:25:56 +1200 -c.txt 63 2015-08-31 13:25:56 +1200 -a.txt 75 2015-08-31 13:25:58 +1200 -b.txt 63 2015-08-31 13:25:56 +1200 -c.txt 63 2015-08-31 13:25:56 +1200 **************************************** **************************************** 7. This should show two pairs of matching directories with the second pair showing different sizes and modification times: -a.txt 75 2015-08-31 13:26:00 +1200 -b.txt 63 2015-08-31 13:25:58 +1200 -c.txt 63 2015-08-31 13:25:58 +1200 -a.txt 75 2015-08-31 13:26:00 +1200 -b.txt 63 2015-08-31 13:25:58 +1200 -c.txt 63 2015-08-31 13:25:58 +1200 --- then after the change --- -a.txt 92 2015-08-31 13:26:00 +1200 -b.txt 80 2015-08-31 13:26:00 +1200 -c.txt 80 2015-08-31 13:26:00 +1200 -a.txt 92 2015-08-31 13:26:00 +1200 -b.txt 80 2015-08-31 13:26:00 +1200 -c.txt 80 2015-08-31 13:26:00 +1200 **************************************** **************************************** 8. This should show the two directories. Then they should only contain c.txt. Then they should have a new version of b.txt: -a.txt 64 2015-08-31 13:26:00 +1200 -b.txt 63 2015-08-31 13:26:00 +1200 -c.txt 63 2015-08-31 13:26:00 +1200 -a.txt 64 2015-08-31 13:26:00 +1200 -b.txt 63 2015-08-31 13:26:00 +1200 -c.txt 63 2015-08-31 13:26:00 +1200 --- only c.txt --- -c.txt 63 2015-08-31 13:26:00 +1200 -c.txt 63 2015-08-31 13:26:00 +1200 --- new b.txt --- -b.txt 57 2015-08-31 13:26:00 +1200 -c.txt 63 2015-08-31 13:26:00 +1200 -b.txt 57 2015-08-31 13:26:00 +1200 -c.txt 63 2015-08-31 13:26:00 +1200 **************************************** **************************************** 9. This starts by showing the initial synchronized directories. file1_1.txt must be 81 bytes long: -dir1_1 -dir1_1_1 -file1_1_1_1.txt 94 2015-08-31 13:26:01 +1200 -dir1_2 -file1_2_1.txt 54 2015-08-31 13:26:01 +1200 -dir2_1 -file2_1_1.txt 78 2015-08-31 13:26:01 +1200 -file1_1.txt 81 2015-08-31 13:26:03 +1200 -file1_2.txt 69 2015-08-31 13:26:01 +1200 -file2_1.txt 69 2015-08-31 13:26:01 +1200 -dir1_1 -dir1_1_1 -file1_1_1_1.txt 94 2015-08-31 13:26:01 +1200 -dir1_2 -file1_2_1.txt 54 2015-08-31 13:26:01 +1200 -dir2_1 -file2_1_1.txt 78 2015-08-31 13:26:01 +1200 -file1_1.txt 81 2015-08-31 13:26:03 +1200 -file1_2.txt 69 2015-08-31 13:26:01 +1200 -file2_1.txt 69 2015-08-31 13:26:01 +1200 --- delete all files --- -dir1_1 -dir1_1_1 -dir1_2 -dir2_1 -dir1_1 -dir1_1_1 -dir1_2 -dir2_1 --- recreate two --- -dir1_1 -dir1_1_1 -file1_1_1_1.txt 74 2015-08-31 13:26:03 +1200 -dir1_2 -dir2_1 -file1_1.txt 54 2015-08-31 13:26:03 +1200 -dir1_1 -dir1_1_1 -file1_1_1_1.txt 74 2015-08-31 13:26:03 +1200 -dir1_2 -dir2_1 -file1_1.txt 54 2015-08-31 13:26:03 +1200 ****************************************