()
| 696 | |
| 697 | def test_status_performance(self): |
| 698 | def assert_status_performance(): |
| 699 | # The test fails if `gl status` takes more than 100 times |
| 700 | # the time `git status` took. |
| 701 | MAX_TOLERANCE = 100 |
| 702 | |
| 703 | t = time.time() |
| 704 | gl.status() |
| 705 | gl_t = time.time() - t |
| 706 | |
| 707 | t = time.time() |
| 708 | git.status() |
| 709 | git_t = time.time() - t |
| 710 | |
| 711 | self.assertTrue( |
| 712 | gl_t < git_t*MAX_TOLERANCE, |
| 713 | msg='gl_t {0}, git_t {1}'.format(gl_t, git_t)) |
| 714 | |
| 715 | # All files are untracked |
| 716 | assert_status_performance() |