Mercurial > kallithea
comparison rhodecode/tests/scripts/test_concurency.py @ 3625:260a7a01b054 beta
follow Python conventions for boolean values
True and False might be singletons and the "default" values for "boolean"
expressions, but "all" values in Python has a boolean value and should be
evaluated as such. Checking with 'is True' and 'is False' is thus confusing,
error prone and unnessarily complex.
If we anywhere rely and nullable boolean fields from the database layer and
don't want the null value to be treated as False then we should check
explicitly for null with 'is None'.
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Thu, 28 Mar 2013 01:10:45 +0100 |
parents | f5dc0417d6b1 |
children | 10b4e34841a4 |
comparison
equal
deleted
inserted
replaced
3624:4dddb7ee8865 | 3625:260a7a01b054 |
---|---|
181 if method == 'pull': | 181 if method == 'pull': |
182 stdout, stderr = Command(cwd).execute(backend, method, '--cwd', dest, clone_url) | 182 stdout, stderr = Command(cwd).execute(backend, method, '--cwd', dest, clone_url) |
183 else: | 183 else: |
184 stdout, stderr = Command(cwd).execute(backend, method, clone_url, dest) | 184 stdout, stderr = Command(cwd).execute(backend, method, clone_url, dest) |
185 print stdout,'sdasdsadsa' | 185 print stdout,'sdasdsadsa' |
186 if no_errors is False: | 186 if not no_errors: |
187 if backend == 'hg': | 187 if backend == 'hg': |
188 assert """adding file changes""" in stdout, 'no messages about cloning' | 188 assert """adding file changes""" in stdout, 'no messages about cloning' |
189 assert """abort""" not in stderr , 'got error from clone' | 189 assert """abort""" not in stderr , 'got error from clone' |
190 elif backend == 'git': | 190 elif backend == 'git': |
191 assert """Cloning into""" in stdout, 'no messages about cloning' | 191 assert """Cloning into""" in stdout, 'no messages about cloning' |