Skip to content

Commit

Permalink
improve messages of unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dirk-thomas committed Jun 12, 2013
1 parent a555651 commit 3b6526b
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 17 deletions.
18 changes: 9 additions & 9 deletions test/rosdep_formatting_test.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
#!/usr/bin/env python

from scripts.check_rosdep import main as check_rosdep
import os

from scripts.check_rosdep import main as check_rosdep

def test():
files= os.listdir('rosdep')

print """Running scripts/check_rosdep.py on all *.yaml in the rosdep directory.
If this fails you can run scripts/clean_rosdep.py to help cleanup"""
def test():
files = os.listdir('rosdep')

print("""
Running 'scripts/check_rosdep.py' on all *.yaml in the rosdep directory.
If this fails you can run 'scripts/clean_rosdep.py' to help cleanup.
""")

for f in files:
fname = os.path.join('rosdep', f)
if not f.endswith('.yaml'):
print "Skipping rosdep check of file %s"%fname
print("Skipping rosdep check of file %s" % fname)
continue
print "Checking rosdep file %s" % fname
print("Checking rosdep file %s" % fname)
assert check_rosdep(fname)


15 changes: 7 additions & 8 deletions test/rosdistro_formatting_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,17 @@


def test():
files= os.listdir('releases')

print """Running scripts/check_rosdistro.py on all *.yaml in the releases directory.
If this fails you can use the python yaml.dump() method to help cleanup"""
files = os.listdir('releases')

print("""
Running 'scripts/check_rosdistro.py' on all *.yaml in the releases directory.
If this fails you can run 'scripts/check_rosdistro.py' to perform the same check locally.
""")

for f in files:
fname = os.path.join('releases', f)
if not f.endswith('.yaml'):
print "Skipping rosdistro check of file %s"%fname
print("Skipping rosdistro check of file %s" % fname)
continue
print "Checking rosdistro file %s" % fname
print("Checking rosdistro file %s" % fname)
assert check_rosdist(fname)


6 changes: 6 additions & 0 deletions test/rosdistro_verify_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,11 @@


def test_verify_files_identical():
print("""
Checking if index.yaml and all referenced files comply to the formatting rules.
If this fails you can run 'rosdistro_reformat index.yaml' to help cleanup.
'rosdistro_reformat' shows the diff between the current files and their expected formatting.
""")

index_url = 'file:https://' + FILES_DIR + '/index.yaml'
assert verify_files_identical(index_url)
5 changes: 5 additions & 0 deletions test/test_build_caches.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,9 @@


def test_build_caches():
print("""
Checking if the package.xml files for all packages are fetchable.
If this fails you can run 'rosdistro_build_cache index.yaml' to perform the same check locally.
""")

generate_release_caches(INDEX_YAML)

0 comments on commit 3b6526b

Please sign in to comment.