Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,8 @@ def parse_args(my_args: list[str], default: str = None) -> argparse.Namespace:
type=check_not_exist)

parser.add_argument("--debug", action='store_true', help="whether to set logging level to debug")
parser.add_argument("--no_log", action='store_true', help="disables logging")


"""
Options for crawl-spec generation
Expand Down Expand Up @@ -248,12 +250,16 @@ def main(argv: list[str] = None) -> str | None:
return

# logging
if args.debug is True:
log_level = logging.DEBUG
if args.no_log is True:
logging.getLogger().setLevel(logging.CRITICAL + 1)
else:
log_level = logging.WARNING
if args.debug is True:
log_level = logging.DEBUG

else:
log_level = logging.WARNING

setup_logger(level=log_level, log_file=args.log_file)
setup_logger(level=log_level, log_file=args.log_file)

if args.query_path is not None and args.query_class is None:
raise argparse.ArgumentTypeError("A query_class must be provided if a query_path is set")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Store the version here so:
1# Store the version here so:
# 1) we don't load dependencies by storing it in __init__.py
# 2) we can import it in setup.py for the same reason
# 3) we can import it into your module
__version__ = '0.7.0-ALPHA'
__version__ = '0.7.1'
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export class RunTimeFlowTestCommandWrapper implements FlowTestCommandWrapper {
const pythonArgs: string[] = [
'-m',
'flowtest',
'--no_log',
'-j',
tmpFile,
'-d',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@ describe('FlowTestCommandWrapper implementations', () => {
it('Correctly parses status updates from stdout', () => {
expect(completionPercentages).toEqual([0, 25, 50, 75]);
});

it('Generates no log file', async () => {
const logFileMatcher = /\.flowtest_log_.+\.log/;
const logFiles = (await fs.readdir('.')).filter(f => f.match(logFileMatcher));
expect(logFiles).toHaveLength(0);
});
Comment on lines +59 to +63
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good now. Thanks for removing the glob dependency.

});

describe('Failure Modes', () => {
Expand Down