1. Arne Babenhauserheide
  2. python_tests

Commits

Arne Babenhauserheide  committed 23052ba

Some fixes...

  • Participants
  • Parent commits 13c2190
  • Branches default

Comments (0)

Files changed (2)

File distributed_version_control_system_test.py

View file
         f.close()
     
     # Now we initialize the repository over the general_test_function. 
-    print "init"
+    print "\n= init =\n"
     test_results["init"] = test_init(number_of_tests=number_of_tests)
     
     # Then we commit all files. 
-    print "initial_commit"
+    print "\n= initial_commit =\n"
     test_results["initial_commit"] = test_initial_commit(number_of_tests=number_of_tests)
     
     # Now we test the speed when appending a small amount of data.
-    print "commit_after_append_small"
+    print "\n= commit_after_append_small =\n"
     test_results["commit_after_append_small"] = test_append_small(data, number_of_tests=number_of_tests)
     
     # And the speed when appending a large amount of data.
-    print "commit_after_append_of_many_lines"
+    print "\n= commit_after_append_of_many_lines =\n"
     test_results["commit_after_append_of_many_lines"] = test_append_many_lines(data, number_of_tests=number_of_tests)
     
     # And the speed when appending a large amount of data.
-    print "commit_after_append_of_one_long_line"
+    print "\n= commit_after_append_of_one_long_line =\n"
     test_results["commit_after_append_of_one_long_line"] = test_append_one_long_line(data, number_of_tests=number_of_tests)
     
     return test_results
     shellcall("git commit -m 'test'")
     
 def backup_repo_git(*args):
-    """Create a backup of the git directory, named .git.bak ."""
+    """Create a backup of the git directory, named .git.bak ."""    
+    # First delete the backup dir
+    shellcall("rm -Rf .git.bak")
     # copy the repo to the backup dir. 
     shellcall("cp -Rf .git .git.bak")
 
     shellcall("hg commit -m 'test'")
     
 def backup_repo_hg(*args):
-    """Create a backup of the git directory, named .git.bak ."""
+    """Create a backup of the hg directory, named .hg.bak ."""
+    # First delete the backup dir
+    shellcall("rm -Rf .hg.bak")
     # copy the repo to the backup dir. 
     shellcall("cp -Rf .hg .hg.bak")
 
 def restore_repo_hg(*args):
-    """Delete and then restore the git dir from backup. """
+    """Delete and then restore the hg dir from backup. """
     # First delete the repo
     shellcall("rm -Rf .hg")
     # Then copy it from the backup
     # If we got no args, we just start it with default values. 
     elif len(argv) == 1: 
         output = dump(test_dvcs())
-    print "\n======\n"
+    print "\n======\nStructure: [git, hg], time in seconds, mean value. \n"
     print output

File general_test_function.py

View file
     results = []
     # Then fill it with results :) 
     for i in range(number_of_tests): 
-        print "run", i
         results.append(general_test_function(functions, *args))
     return results