Skip to content

Commit

Permalink
update pytest check
Browse files Browse the repository at this point in the history
  • Loading branch information
voschezang committed Mar 12, 2024
1 parent 6bbed08 commit 77feafc
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/mash/io_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,8 @@ def add_default_args(parser: ArgumentParser):
def allow_all_args():
parser.add_argument('*', nargs='*')


def python_is_run_in_test_mode() -> bool:
return 'pytest' in sys.modules.keys() or \
('unittest' in sys.modules.keys() and 'nltk' not in sys.modules.keys())

return os.path.basename(sys.argv[0]) in ('pytest', 'py.test', 'run_pytest_script.py')

class ArgparseWrapper:
def __init__(self, *args,
Expand Down

0 comments on commit 77feafc

Please sign in to comment.