improve line width estimate
This commit is contained in:
		
							parent
							
								
									9bd4b0a05e
								
							
						
					
					
						commit
						29c5ac71bc
					
				
							
								
								
									
										2
									
								
								setup.py
								
								
								
								
							
							
						
						
									
										2
									
								
								setup.py
								
								
								
								
							|  | @ -59,7 +59,7 @@ def get_environment_marker_support_level(): | ||||||
| def main(): | def main(): | ||||||
|     extras_require = {} |     extras_require = {} | ||||||
|     install_requires = [ |     install_requires = [ | ||||||
|         "py>=1.5.0", |         "py>=1.6.0", | ||||||
|         "six>=1.10.0", |         "six>=1.10.0", | ||||||
|         "setuptools", |         "setuptools", | ||||||
|         "attrs>=17.4.0", |         "attrs>=17.4.0", | ||||||
|  |  | ||||||
|  | @ -413,7 +413,7 @@ class TerminalReporter(object): | ||||||
|                 self._write_progress_information_filling_space() |                 self._write_progress_information_filling_space() | ||||||
|             else: |             else: | ||||||
|                 past_edge = ( |                 past_edge = ( | ||||||
|                     self._tw.chars_on_current_line + self._PROGRESS_LENGTH + 1 |                     self._tw.width_of_current_line + self._PROGRESS_LENGTH + 1 | ||||||
|                     >= self._screen_width |                     >= self._screen_width | ||||||
|                 ) |                 ) | ||||||
|                 if past_edge: |                 if past_edge: | ||||||
|  | @ -433,10 +433,8 @@ class TerminalReporter(object): | ||||||
| 
 | 
 | ||||||
|     def _write_progress_information_filling_space(self): |     def _write_progress_information_filling_space(self): | ||||||
|         msg = self._get_progress_information_message() |         msg = self._get_progress_information_message() | ||||||
|         fill = " " * ( |         fill = self._tw.fullwidth - self._tw.width_of_current_line - 1 | ||||||
|             self._tw.fullwidth - self._tw.chars_on_current_line - len(msg) - 1 |         self.write(msg.rjust(fill), cyan=True) | ||||||
|         ) |  | ||||||
|         self.write(fill + msg, cyan=True) |  | ||||||
| 
 | 
 | ||||||
|     def pytest_collection(self): |     def pytest_collection(self): | ||||||
|         if not self.isatty and self.config.option.verbose >= 1: |         if not self.isatty and self.config.option.verbose >= 1: | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue