1. Martin von Löwis
  2. PasteScript

Commits

ianb  committed da5b549

Updated tests, because py.test can print out some text to stderr depending on how it is installed

  • Participants
  • Parent commits 01bf92a
  • Branches default

Comments (0)

Files changed (1)

File tests/appsetup/test_make_project.py

View file
 
 def do_pytest():
     res = projenv.run('py.test tests/',
-                      cwd=os.path.join(testenv.cwd, 'ProjectName'))
+                      cwd=os.path.join(testenv.cwd, 'ProjectName'),
+                      expect_stderr=True)
+    assert len(res.stderr.splitlines()) <= 1, (
+        "Too much info on stderr: %s" % res.stderr)
 
 def config_permissions():
     projenv.writefile('ProjectName.egg-info/iscape.txt',
                       frompath='admin_index.py')
     projenv.writefile('tests/test_forbidden.py',
                       frompath='test_forbidden.py')
-    res = projenv.run('py.test tests/test_forbidden.py')
+    res = projenv.run('py.test tests/test_forbidden.py',
+                      expect_stderr=True)
+    assert len(res.stderr.splitlines()) <= 1, (
+        "Too much info on stderr: %s" % res.stderr)
 
 def make_tag():
     global tagenv