Skip to content

Commit

Permalink
LibraryList : added __radd__ fixed unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
alalazo committed Sep 5, 2016
1 parent b9ba6c0 commit 39df558
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions lib/spack/llnl/util/filesystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,9 @@ def __getitem__(self, item):
def __add__(self, other):
return LibraryList(dedupe(self.libraries + list(other)))

def __radd__(self, other):
return self.__add__(other)

def __eq__(self, other):
return self.libraries == other.libraries

Expand Down
2 changes: 1 addition & 1 deletion lib/spack/spack/test/library_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,6 @@ def test_add(self):
type(self.liblist + pylist)
)
self.assertEqual(
type(self.liblist + pylist),
type(pylist + self.liblist),
type(self.liblist)
)

0 comments on commit 39df558

Please sign in to comment.