Changeset 40:f4140b9f7311 in pyenvjasmine
- Timestamp:
- Apr 3, 2018, 1:41:17 PM (7 years ago)
- Branch:
- default
- Phase:
- public
- Files:
-
- 2 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
README.rst
r26 r40 31 31 https://packaging.python.org/en/latest/distributing.html#working-in-development-mode 32 32 33 .. warning:: 34 35 Starting with version **0.3.0**, pyenvjasmine has support to run tests with 36 different browsers/engines. The headless browser rhino is included with 37 pyenvjasmine, but in order to use the other engines, you have to install the 38 needed browser(s). 39 40 Right now, only phantomjs_ is supported, so ensure you have it installed if 41 you want to use that browser/engine to run tests on. **Required if you want 42 to run tests on jasmine 3.x** (also required to run pyenvjasmine's own 43 tests). 44 33 45 34 46 Running pyenvjasmine tests … … 36 48 37 49 To run the tests on this code here (as opposed to *your* JavaScript code you 38 want to test), install pyenvjasmine and then run::50 want to test), install pyenvjasmine (and phantomjs) and then run:: 39 51 40 52 py.test … … 58 70 runner = Runner( 59 71 testdir='/path/to/my/testdir', 60 configfile='relative/path/to/configfile') 72 configfile='relative/path/to/configfile', 73 testing_environment='phantomjs') 61 74 success, stdout = runner.run() 62 75 # assert on success, will be true if tests passed, False if any 63 76 # test failed 64 assert success 77 assert success, "One or more javascript tests have failed" 65 78 # you can inspect stdout if you want to get more info, but it 66 79 # will be printed to the console stdout anyway 67 80 assert b'Total: 120' in stdout 68 81 82 In this example, the *phantomjs* browse/engine is used, replace that with 83 *rhino* to run tests on rhino + jasmine 1.x. 84 85 .. note:: 86 87 *phantomjs* is the preferred browser/engine, so it is what pyenvjasmine 88 will use as a default if you don't set *testing_environment* when creating 89 a new *Runner* instance. 69 90 70 91 .. _envjasmine : https://github.com/trevmex/EnvJasmine 71 92 .. _pip: http://www.pip-installer.org/en/latest/index.html 72 93 .. _easy_install: http://peak.telecommunity.com/DevCenter/EasyInstall 94 .. _phantomjs: http://phantomjs.org -
setup.py
r37 r40 2 2 from distutils.core import setup 3 3 4 version = '0. 2.1'4 version = '0.3.0' 5 5 6 6 requires = [
Note:
See TracChangeset
for help on using the changeset viewer.