Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chg: dev: Use realpath for pytest plugin search paths #86

Merged
merged 2 commits into from Jun 4, 2020
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/topology/libraries/utils.py
Expand Up @@ -61,7 +61,7 @@ def my_library_function(enode, state, arg1, arg2, keyword_arg1=None):

# Set a default statename
if statename is None:
statename = '_lib_state_'.format(stateclass.__name__.lower())
statename = '_lib_state_{}'.format(stateclass.__name__.lower())

def decorator(func):
def replacement(enode, *args, **kwargs):
Expand Down
5 changes: 4 additions & 1 deletion lib/topology/logging.py
Expand Up @@ -434,7 +434,10 @@ def __call__(self, msg):
'>>> [{:03d}] :: {}:{}\n{}'.format(
self.step, execution_context, line_number,
'\n'.join(
['... {}'.format(l) for l in msg.strip().splitlines()]
[
'... {}'.format(line)
for line in msg.strip().splitlines()
]
)
)
)
Expand Down
4 changes: 2 additions & 2 deletions lib/topology/pytest/plugin.py
Expand Up @@ -42,7 +42,7 @@
from os import getcwd, makedirs
from traceback import format_exc
from collections import OrderedDict
from os.path import join, isabs, abspath, exists, isdir
from os.path import join, isabs, abspath, realpath, exists, isdir

from pytest import fixture, fail, hookimpl, skip

Expand Down Expand Up @@ -274,7 +274,7 @@ def create_dir(path):

# Get a list of all testing directories
search_paths = [
abspath(arg) for arg in config.args if isdir(arg)
realpath(arg) for arg in config.args if isdir(arg)
]

injected_attr = parse_attribute_injection(
Expand Down