File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2222__doc__ = """Utils module contains many helpers for several task,
2323like reading files or path management"""
2424
25+ from src .api .check import is_callable
26+
2527SHELVE_PATH = os .path .join (constants .ZXBASIC_ROOT , "parsetab" , "tabs.dbm" )
2628SHELVE = shelve .open (SHELVE_PATH )
2729
@@ -197,7 +199,7 @@ def _handle_timeout(signum, frame):
197199
198200 def wrapper (* args , ** kwargs ):
199201 signal .signal (signal .SIGALRM , _handle_timeout )
200- signal .alarm (seconds () if isinstance (seconds , Callable ) else seconds )
202+ signal .alarm (seconds () if is_callable (seconds ) else seconds )
201203 try :
202204 result = func (* args , ** kwargs )
203205 finally :
Original file line number Diff line number Diff line change 4141from src .zxbc .args_parser import FileType # noqa
4242from src .api .utils import open_file # noqa
4343
44- DEFAULT_TIMEOUT : Final [int ] = 3 # Default test timeout in seconds
44+ DEFAULT_TIMEOUT : Final [int ] = 10 # Default test timeout in seconds
4545
4646# global FLAGS
4747CLOSE_STDERR = False # Whether to show compiler error or not (usually not when doing tests)
4848PRINT_DIFF = False # Will show diff on test failure
4949VIM_DIFF = False # Will show visual diff using (g?)vimdiff on test failure
5050UPDATE : bool = False # True and test will be updated on failure
51- FOUT = sys .stdout # Output file. By default stdout but can be captured changing this
51+ FOUT = sys .stdout # Output file. By default, stdout but can be captured changing this
5252TEMP_DIR : str = ""
53- QUIET = False # True so suppress output (useful for testing)
53+ QUIET = False # True to suppress output (useful for testing)
5454DEFAULT_STDERR = "/dev/stderr"
5555STDERR : str = ""
56- INLINE : bool = True # Set to false to use system Shell
56+ INLINE : bool = True # Set to False to use system Shell
5757RAISE_EXCEPTIONS = False # True if we want the testing to abort on compiler crashes
5858TIMEOUT = DEFAULT_TIMEOUT # Max number of seconds a test should last
5959
You can’t perform that action at this time.
0 commit comments