kanryu

nose_mine.py

Aug 15th, 2012
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.59 KB | None | 0 0
  1. import unittest
  2. import os
  3. import nose
  4. from nose.core import TextTestRunner, TestProgram
  5. from nose.config import Config, all_config_files
  6. from nose.plugins.manager import PluginManager, DefaultPluginManager, \
  7.      RestrictedPluginManager
  8.  
  9.  
  10. class LoggedTextTestRunner(TextTestRunner):
  11.     def run(self, test):
  12.         result = TextTestRunner.run(self, test)
  13.         self.result = result
  14.         return result
  15.  
  16. def make_config():
  17.     cfg_files = all_config_files()
  18.     manager = DefaultPluginManager()
  19.     config = Config(env=os.environ, files=cfg_files, plugins=manager)
  20.     return config
Advertisement
Add Comment
Please, Sign In to add comment