Changeset 11:07d6db84d127 in pyenvjasmine


Ignore:
Timestamp:
Apr 22, 2015, 1:13:33 PM (9 years ago)
Author:
Borja Lopez <borja@…>
Branch:
default
Phase:
public
Message:

Small update to the docs, how to run nosetests with the local nose.cfg and some line length adjustments

File:
1 edited

Legend:

Unmodified
Added
Removed
  • README.rst

    r8 r11  
    3636
    3737
    38 Running the tests of this python module:
    39 ----------------------------------------
     38Running pyenvjasmine tests
     39--------------------------
    4040
    41 To run the tests on this code here (as opposed to *your* JavaScript
    42 code you want to test), install this into a virtualenv, install
    43 nose and maybe coverage in that virtualenv and then run::
     41To run the tests on this code here (as opposed to *your* JavaScript code you
     42want to test), install pyenvjasmine and then run::
    4443
    4544    nosetests --cover-package=pyenvjasmine --cover-erase \
     
    5150   run::
    5251
    53      nosetests
     52     nosetests -c nose.cfg
    5453
    55    to run the tests.
     54   to run the tests from within the pyenvjasmine sources directory.
    5655
    5756
     
    5958------------------
    6059
    61 The easiest way is to put your "specs" (JavaScript tests) into
    62 some directory in your code, then in your python tests, add a new
    63 TestCase with just one test that runs all your JavaScript tests.
     60The easiest way is to put your "specs" (JavaScript tests) into some directory
     61in your code, then in your python tests, add a new TestCase with just one test
     62that runs all your JavaScript tests.
    6463
    65 The simplest solution is to set capture_output to False, so you see
    66 the output from the js tests on the console. Something like this::
     64The simplest solution is to set capture_output to False, so you see the output
     65from the js tests on the console. Something like this::
    6766
    6867    import unittest
     
    7776
    7877
    79 If you want a more integrated
    80 test control, you could set capture_output to True, then parse the test
    81 output that is returned from the run() method, with something like this::
     78If you want a more integrated test control, you could set capture_output to
     79True, then parse the test output that is returned from the run() method, with
     80something like this::
    8281
     82    import unittest
     83    from pyenvjasmine.runner import TestRunner
     84
     85    class JavaScriptTests(unittest.TestCase):
    8386        def test_my_javascript_no_output(self):
    8487            runner = TestRunner(
Note: See TracChangeset for help on using the changeset viewer.