Handle missing prompt render case?
							parent
							
								
									9e6a22e52e
								
							
						
					
					
						commit
						4366873582
					
				|  | @ -18,6 +18,10 @@ import time | ||||||
| 
 | 
 | ||||||
| import pytest | import pytest | ||||||
| import pexpect | import pexpect | ||||||
|  | from pexpect.exceptions import ( | ||||||
|  |     TIMEOUT, | ||||||
|  |     EOF, | ||||||
|  | ) | ||||||
| 
 | 
 | ||||||
| from conftest import repodir | from conftest import repodir | ||||||
| 
 | 
 | ||||||
|  | @ -544,7 +548,7 @@ def test_multi_daemon_subactors( | ||||||
|     # now the root actor won't clobber the bp_forever child |     # now the root actor won't clobber the bp_forever child | ||||||
|     # during it's first access to the debug lock, but will instead |     # during it's first access to the debug lock, but will instead | ||||||
|     # wait for the lock to release, by the edge triggered |     # wait for the lock to release, by the edge triggered | ||||||
|     # ``_debug._no_remote_has_tty`` event before sending cancel messages |     # ``_debug.Lock.no_remote_has_tty`` event before sending cancel messages | ||||||
|     # (via portals) to its underlings B) |     # (via portals) to its underlings B) | ||||||
| 
 | 
 | ||||||
|     # at some point here there should have been some warning msg from |     # at some point here there should have been some warning msg from | ||||||
|  | @ -577,7 +581,7 @@ def test_multi_daemon_subactors( | ||||||
|         child.sendline('c') |         child.sendline('c') | ||||||
|         child.expect(pexpect.EOF) |         child.expect(pexpect.EOF) | ||||||
| 
 | 
 | ||||||
|     except pexpect.exceptions.TIMEOUT: |     except TIMEOUT: | ||||||
|         # Failed to exit using continue..? |         # Failed to exit using continue..? | ||||||
|         child.sendline('q') |         child.sendline('q') | ||||||
|         child.expect(pexpect.EOF) |         child.expect(pexpect.EOF) | ||||||
|  | @ -604,10 +608,15 @@ def test_multi_subactors_root_errors( | ||||||
|     if ctlc: |     if ctlc: | ||||||
|         do_ctlc(child) |         do_ctlc(child) | ||||||
| 
 | 
 | ||||||
|  |     # continue again to catch 2nd name error from | ||||||
|     # continue again to catch 2nd name error from |     # continue again to catch 2nd name error from | ||||||
|     # actor 'name_error_1' (which is 2nd depth). |     # actor 'name_error_1' (which is 2nd depth). | ||||||
|     child.sendline('c') |     child.sendline('c') | ||||||
|     child.expect(r"\(Pdb\+\+\)") |     try: | ||||||
|  |         child.expect(r"\(Pdb\+\+\)") | ||||||
|  |     except TIMEOUT: | ||||||
|  |         child.sendline('') | ||||||
|  | 
 | ||||||
|     before = str(child.before.decode()) |     before = str(child.before.decode()) | ||||||
|     assert "Attaching to pdb in crashed actor: ('name_error_1'" in before |     assert "Attaching to pdb in crashed actor: ('name_error_1'" in before | ||||||
|     assert "NameError" in before |     assert "NameError" in before | ||||||
|  | @ -676,7 +685,7 @@ def test_multi_nested_subactors_error_through_nurseries( | ||||||
|             child.sendline('c') |             child.sendline('c') | ||||||
|             time.sleep(0.1) |             time.sleep(0.1) | ||||||
| 
 | 
 | ||||||
|         except pexpect.exceptions.EOF: |         except EOF: | ||||||
| 
 | 
 | ||||||
|             # race conditions on how fast the continue is sent? |             # race conditions on how fast the continue is sent? | ||||||
|             print(f"Failed early on {i}?") |             print(f"Failed early on {i}?") | ||||||
|  | @ -722,8 +731,8 @@ def test_root_nursery_cancels_before_child_releases_tty_lock( | ||||||
|             child.expect(r"\(Pdb\+\+\)") |             child.expect(r"\(Pdb\+\+\)") | ||||||
| 
 | 
 | ||||||
|         except ( |         except ( | ||||||
|             pexpect.exceptions.EOF, |             EOF, | ||||||
|             pexpect.exceptions.TIMEOUT, |             TIMEOUT, | ||||||
|         ): |         ): | ||||||
|             # races all over.. |             # races all over.. | ||||||
| 
 | 
 | ||||||
|  | @ -748,7 +757,7 @@ def test_root_nursery_cancels_before_child_releases_tty_lock( | ||||||
|         try: |         try: | ||||||
|             child.expect(pexpect.EOF) |             child.expect(pexpect.EOF) | ||||||
|             break |             break | ||||||
|         except pexpect.exceptions.TIMEOUT: |         except TIMEOUT: | ||||||
|             child.sendline('c') |             child.sendline('c') | ||||||
|             time.sleep(0.1) |             time.sleep(0.1) | ||||||
|             print('child was able to grab tty lock again?') |             print('child was able to grab tty lock again?') | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue