Show More
@@ -79,7 +79,7 def test_push_new_file(): | |||||
79 |
|
79 | |||
80 | __execute_cmd('touch %s' % added_file) |
|
80 | __execute_cmd('touch %s' % added_file) | |
81 |
|
81 | |||
82 |
__execute_cmd('hg add |
|
82 | __execute_cmd('hg add %s' % added_file) | |
83 |
|
83 | |||
84 | for i in xrange(15): |
|
84 | for i in xrange(15): | |
85 | cmd = """echo 'added_line%s' >> %s""" % (i, added_file) |
|
85 | cmd = """echo 'added_line%s' >> %s""" % (i, added_file) | |
@@ -109,10 +109,30 def test_push_wrong_credentials(): | |||||
109 |
|
109 | |||
110 | __execute_cmd('hg push %s' % clone_url) |
|
110 | __execute_cmd('hg push %s' % clone_url) | |
111 |
|
111 | |||
|
112 | def test_push_wrong_path(): | |||
|
113 | added_file = jn(TESTS_TMP_PATH, HG_REPO, 'somefile.py') | |||
112 |
|
114 | |||
|
115 | try: | |||
|
116 | os.makedirs(jn(TESTS_TMP_PATH, HG_REPO)) | |||
|
117 | except OSError: | |||
|
118 | pass | |||
|
119 | ||||
|
120 | __execute_cmd("""echo '' > %s""" % added_file) | |||
|
121 | ||||
|
122 | __execute_cmd("""hg add %s""" % added_file) | |||
|
123 | ||||
|
124 | for i in xrange(2): | |||
|
125 | cmd = """echo 'added_line%s' >> %s""" % (i, added_file) | |||
|
126 | __execute_cmd(cmd) | |||
|
127 | ||||
|
128 | cmd = """hg ci -m 'commited new %s' %s """ % (i, added_file) | |||
|
129 | __execute_cmd(cmd) | |||
|
130 | ||||
|
131 | __execute_cmd('hg push %s' % jn(TESTS_TMP_PATH, HG_REPO + '_error')) | |||
113 |
|
132 | |||
114 | if __name__ == '__main__': |
|
133 | if __name__ == '__main__': | |
|
134 | test_clone() | |||
|
135 | test_push_wrong_path() | |||
115 | test_push_wrong_credentials() |
|
136 | test_push_wrong_credentials() | |
116 |
|
|
137 | test_push_new_file() | |
117 | #test_push_new_file() |
|
|||
118 |
|
138 |
General Comments 0
You need to be logged in to leave comments.
Login now