1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2025-03-03 10:17:40 +00:00

fix progress tests on travis

we now check if we really have a terminal before doing the fancy auto-detection testing
This commit is contained in:
Antoine Beaupré 2015-11-22 21:24:37 -05:00
parent a6f8436ceb
commit 0196d80b28

View file

@ -670,6 +670,19 @@ def test_create_dry_run(self):
self.assert_equal(len(manifest.archives), 0)
def test_progress(self):
self.create_regular_file('file1', size=1024 * 80)
self.cmd('init', self.repository_location)
# progress forced on
output = self.cmd('create', '--progress', self.repository_location + '::test4', 'input')
self.assert_in("\r", output)
# progress forced off
output = self.cmd('create', '--no-progress', self.repository_location + '::test5', 'input')
self.assert_not_in("\r", output)
@unittest.skipUnless(sys.stdout.isatty(), 'need a tty to test auto-detection')
def test_progress_tty(self):
"""test that the --progress and --no-progress flags work,
overriding defaults from the terminal auto-detection"""
self.create_regular_file('file1', size=1024 * 80)
self.cmd('init', self.repository_location)
# without a terminal, no progress expected