rosdep_duplicates_test.py 603 B

1234567891011121314151617
  1. #!/usr/bin/env python
  2. import os
  3. from scripts.check_duplicates import main as check_duplicates
  4. from .fold_block import Fold
  5. def test_rosdep_duplicates():
  6. files = os.listdir('rosdep')
  7. files = [x for x in files if x.endswith('.yaml')] # accept only files ending with .yaml
  8. files = [os.path.join('rosdep', x) for x in files] # use relative path
  9. with Fold() as fold:
  10. print("Running 'scripts/check_duplicates.py' on all '*.yaml' in the 'rosdep' directory.")
  11. print('Checking duplicates rosdep file: %s' % files)
  12. assert check_duplicates(files), fold.get_message()