Skip to content

Commit

Permalink
Fixing small pytest errors
Browse files Browse the repository at this point in the history
  • Loading branch information
kbessonov1984 committed Jul 30, 2024
1 parent 4ef8526 commit 6cca035
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions ectyper/ectyper.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ def run_program():

args = commandLineOptions.parse_command_line()


output_directory = create_output_directory(args.output)

# Create a file handler for log messages in the output directory for the root thread
Expand Down
6 changes: 4 additions & 2 deletions ectyper/genomeFunctions.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,14 @@ def get_files_as_list(files_or_directories, max_depth_level):
"""

files_list = []


init_min_dir_level = min([os.path.abspath(p).count(os.sep)+1 if os.path.isdir(p) else os.path.abspath(p).count(os.sep) for p in files_or_directories])

for file_or_directory in sorted([os.path.abspath(p) for p in files_or_directories]):
for file_or_directory in sorted([os.path.abspath(p) for p in files_or_directories if len(p) != 0]):

dir_level_current = get_relative_directory_level(file_or_directory, init_min_dir_level)

if dir_level_current > max_depth_level:
LOG.info(f"Directory level exceeded ({dir_level_current} > {max_depth_level}), skipping {file_or_directory} ...")
continue
Expand Down
2 changes: 1 addition & 1 deletion test/test_ectyper_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def test_integration_no_file():
:return: None
"""
file = ''
set_input(file)
set_input(input=file)
with pytest.raises(FileNotFoundError) as se:
ectyper.run_program()
assert se.type == FileNotFoundError
Expand Down

0 comments on commit 6cca035

Please sign in to comment.