diff --git a/tests/test_git.py b/tests/test_git.py index 1f2324661..e4559be33 100644 --- a/tests/test_git.py +++ b/tests/test_git.py @@ -2072,6 +2072,8 @@ def test_has_loose_objects(self): # Create a loose object in the repository process = subprocess.Popen(['git', 'hash-object', '-w', '--stdin'], stdin=subprocess.PIPE, + stdout = subprocess.DEVNULL, + stderr = subprocess.DEVNULL, cwd=new_path, env={'LANG': 'C'}) process.communicate(input=b"Data test") @@ -2079,8 +2081,12 @@ def test_has_loose_objects(self): self.assertTrue(repo.has_loose_objects()) # Group loose objects in a packfile and remove unreachable objects - subprocess.run(['git', 'gc'], cwd=new_path, check=True) - subprocess.run(['git', 'prune'], cwd=new_path, check=True) + subprocess.run(['git', 'gc'], + stdout = subprocess.DEVNULL, stderr = subprocess.DEVNULL, + cwd=new_path, check=True) + subprocess.run(['git', 'prune'], + stdout = subprocess.DEVNULL, stderr = subprocess.DEVNULL, + cwd=new_path, check=True) self.assertFalse(repo.has_loose_objects()) diff --git a/tests/test_gitter.py b/tests/test_gitter.py index 6809616d0..c59e05d51 100644 --- a/tests/test_gitter.py +++ b/tests/test_gitter.py @@ -204,7 +204,6 @@ def test_fetch_from_date(self): from_date = datetime.datetime(2020, 3, 24, 0, 0, tzinfo=dateutil.tz.tzutc()) backend = Gitter(group='testapicomm', room='community', api_token='aaa', max_items=1) messages = [m for m in backend.fetch(from_date=from_date)] - print(messages) self.assertEqual(len(messages), 1) message = messages[0]