diff options
author | Jürg Billeter <j@bitron.ch> | 2018-10-23 10:47:37 +0200 |
---|---|---|
committer | Jürg Billeter <j@bitron.ch> | 2018-10-23 11:22:19 +0200 |
commit | b74aca1a3964deffc41c72b16a1bf1ebf013703c (patch) | |
tree | f3485b1d790f9b24949402d5741f387b90129a82 /tests/testutils | |
parent | be29e0f567e9633220228b7f3bc71ca34317d4ef (diff) | |
download | buildstream-b74aca1a3964deffc41c72b16a1bf1ebf013703c.tar.gz |
tests/testutils/artifactshare.py: Fix has_artifact() to match core code
Replace path separator with '-' to match Element.normal_name.
Diffstat (limited to 'tests/testutils')
-rw-r--r-- | tests/testutils/artifactshare.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/testutils/artifactshare.py b/tests/testutils/artifactshare.py index 759fd7b00..a8af59905 100644 --- a/tests/testutils/artifactshare.py +++ b/tests/testutils/artifactshare.py @@ -122,9 +122,8 @@ class ArtifactShare(): # same algo for creating an artifact reference # - # Chop off the .bst suffix first - assert element_name.endswith('.bst') - element_name = element_name[:-4] + # Replace path separator and chop off the .bst suffix + element_name = os.path.splitext(element_name.replace(os.sep, '-'))[0] valid_chars = string.digits + string.ascii_letters + '-._' element_name = ''.join([ |