-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Andy Landy
committed
Nov 16, 2024
1 parent
cc13189
commit fe8c36a
Showing
7 changed files
with
76 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
tests/dumps/test_tb_alias.create_and_rm_tb_alias.run_1_without_tb.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Traceback (most recent call last): | ||
File "...omitted for tests only.../code.py", line...omitted for tests only..., in <module> | ||
import tb.a | ||
ModuleNotFoundError: No module named 'tb' |
4 changes: 4 additions & 0 deletions
4
tests/dumps/test_tb_alias.create_and_rm_tb_alias.run_2_without_tb.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Traceback (most recent call last): | ||
File "...omitted for tests only.../code.py", line...omitted for tests only..., in <module> | ||
import tb.a | ||
ModuleNotFoundError: No module named 'tb' |
29 changes: 29 additions & 0 deletions
29
tests/dumps/test_tb_alias.create_and_rm_tb_alias.run_with_tb.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
Traceback with variables (most recent call last): | ||
File "...omitted for tests only.../code.py", line...omitted for tests only..., in <module> | ||
f() | ||
...skipped... 13 vars | ||
File "...omitted for tests only.../code.py", line...omitted for tests only..., in f | ||
return f( | ||
n = 10001 | ||
s1 = 'short string with n: 10001' | ||
l1 = 'long string with 0..n: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 1...9951, 9952, 9953, 9954, 9955, 9956, 9957, 9958, 9959, 9960, 9961, 9962, 9963, 9964, 9965, 9966, 9967, 9968, 9969, 9970, 9971, 9972, 9973, 9974, 9975, 9976, 9977, 9978, 9979, 9980, 9981, 9982, 9983, 9984, 9985, 9986, 9987, 9988, 9989, 9990, 9991, 9992, 9993, 9994, 9995, 9996, 9997, 9998, 9999, 10000' | ||
us = <exception while printing> Traceback (most recent call last): | ||
File "...omitted for tests only.../core.py", line...omitted for tests only..., in _to_cropped_str | ||
raw = print_(obj) | ||
File "...omitted for tests only.../code.py", line...omitted for tests only..., in __repr__ | ||
raise ValueError("please don't print me") | ||
ValueError: please don't print me | ||
|
||
File "...omitted for tests only.../code.py", line...omitted for tests only..., in f | ||
return 1 // (n * 0) | ||
n = 10000 | ||
s1 = 'short string with n: 10000' | ||
l1 = 'long string with 0..n: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 1... 9950, 9951, 9952, 9953, 9954, 9955, 9956, 9957, 9958, 9959, 9960, 9961, 9962, 9963, 9964, 9965, 9966, 9967, 9968, 9969, 9970, 9971, 9972, 9973, 9974, 9975, 9976, 9977, 9978, 9979, 9980, 9981, 9982, 9983, 9984, 9985, 9986, 9987, 9988, 9989, 9990, 9991, 9992, 9993, 9994, 9995, 9996, 9997, 9998, 9999' | ||
us = <exception while printing> Traceback (most recent call last): | ||
File "...omitted for tests only.../core.py", line...omitted for tests only..., in _to_cropped_str | ||
raw = print_(obj) | ||
File "...omitted for tests only.../code.py", line...omitted for tests only..., in __repr__ | ||
raise ValueError("please don't print me") | ||
ValueError: please don't print me | ||
|
||
builtins.ZeroDivisionError: integer division or modulo by zero |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import pytest | ||
|
||
from traceback_with_variables.tb_alias import create_tb_alias, rm_tb_alias | ||
|
||
from tests.test_utils import run_code, dummies_code, tb_reg | ||
|
||
|
||
def test_create_and_rm_tb_alias(tmp_path, tb_reg): | ||
tb_reg(run_code(tmp_path, [], ['import tb.a', dummies_code, 'f()'], [], True), 'run 1 without tb') | ||
|
||
create_tb_alias() | ||
tb_reg(run_code(tmp_path, [], ['import tb.a', dummies_code, 'f()'], [], True), 'run with tb') | ||
|
||
rm_tb_alias() | ||
tb_reg(run_code(tmp_path, [], ['import tb.a', dummies_code, 'f()'], [], True), 'run 2 without tb') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters