diff --git a/tests/git_nb_log.py b/tests/git_nb_log.py index 44975eb..df51ca0 100644 --- a/tests/git_nb_log.py +++ b/tests/git_nb_log.py @@ -2,6 +2,7 @@ import time + def getstatusoutput(cmd): try: data = subprocess.check_output(cmd, shell=True, universal_newlines=True, @@ -14,6 +15,7 @@ def getstatusoutput(cmd): data = data[:-1] return exitcode, data + def do_cmd(cmd_strx): print(f'执行 {cmd_strx}') retx = getstatusoutput(cmd_strx) @@ -23,6 +25,7 @@ def do_cmd(cmd_strx): print(retx[1], '\n') return retx + t0 = time.time() do_cmd('git pull') @@ -33,16 +36,8 @@ def do_cmd(cmd_strx): do_cmd('git commit -m commit') - - do_cmd('git push origin') # print(subprocess.getstatusoutput('git push github')) print(f'spend_time {time.time() - t0}') time.sleep(100000) - - - - - -