Changeset 67

Show
Ignore:
Timestamp:
Mon Jun 26 20:26:16 2006
Author:
jpellerin
Message:

r3470@Jason-Pellerins-Computer: jhp | 2006-06-24 20:31:32 -0500
Fill in a few more tests, bump version to 0.9 for 0.9 final release

Files:

Legend:

Unmodified
Added
Removed
Modified
  • branches/0.9-stable/unit_tests/test_plugins.py

    r65 r67  
    5 5 import nose.plugins  
    6 6 from optparse import OptionParser  
      7 import tempfile  
    7 8 from warnings import warn  
    8 9  
     
    402 403         plug.finalize(result)  
    403 404         self.assertEqual(out, ["WARNING: missed test 'a'"])  
      405  
      406 class TestProfPlugin(unittest.TestCase):  
      407     def test_options(self):  
      408         parser = OptionParser()  
      409         conf = Config()  
      410         plug = Profile()  
      411  
      412         plug.add_options(parser, {})  
      413         opts = [ o._long_opts[0] for o in parser.option_list ]  
      414         assert '--profile-sort' in opts  
      415         assert '--profile-stats-file' in opts  
      416         assert '--with-profile' in opts  
      417         assert '--profile-restrict' in opts  
      418  
      419     def test_begin(self):  
      420         plug = Profile()  
      421         plug.pfile = tempfile.mkstemp()[1]  
      422         plug.begin()  
      423         assert plug.prof  
      424  
      425     def test_prepare_test(self):  
      426         r = {}  
      427         class dummy:  
      428             def runcall(self, f, r):  
      429                 r[1] = f(), "wrapped"  
      430         def func():  
      431             return "func"  
      432          
      433         plug = Profile()  
      434         plug.prof = dummy()  
      435         result = plug.prepareTest(func)  
      436         result(r)  
      437         assert r[1] == ("func", "wrapped")  
    404 438          
    405 439 if __name__ == '__main__':  
  • branches/0.9-stable/nose/__init__.py

    r64 r67  
    300 300  
    301 301 __author__ = 'Jason Pellerin'  
    302   __version__ = '0.9.0rc1'  
    303   __versioninfo__ = (0, 9, 0, 'rc1')  
      302 __version__ = '0.9.0'  
      303 __versioninfo__ = (0, 9, 0)  
    304 304  
    305 305 __all__ = [