Changeset 42:a67c2fe2b2aa in pyenvjasmine


Ignore:
Timestamp:
Apr 3, 2018, 1:57:36 PM (6 years ago)
Author:
Borja Lopez <borja@…>
Branch:
default
Phase:
public
Message:

Fixed typo (enviroment/environment)

Location:
pyenvjasmine
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pyenvjasmine/runner.py

    r39 r42  
    103103
    104104    def __init__(self, rootdir=None, testdir=None, configfile=None,
    105                  browser_configfile=None, testing_enviroment='phantomjs'):
     105                 browser_configfile=None, testing_environment='phantomjs'):
    106106        """
    107107        Set up paths, by default everything is
     
    126126        self.browser_configfile = browser_configfile
    127127        self.runner_js = os.path.join(here, 'run-jasmine3.js')
    128         self.testing_enviroment = testing_enviroment
     128        self.testing_environment = testing_environment
    129129        environment = get_environment()
    130130        rhino_path = os.path.join(self.rootdir, 'lib', 'rhino', 'js.jar')
     
    166166        }
    167167        self.runner_html = os.path.join(here,
    168                               self.envs[self.testing_enviroment]['runner_html'])
     168                              self.envs[self.testing_environment]['runner_html'])
    169169
    170170    def command_params_rhino(self, command):
     
    191191        if self.browser_configfile and os.path.exists(self.browser_configfile):
    192192            self.write_browser_htmlfile()
    193         command = self.envs[self.testing_enviroment]['command']
     193        command = self.envs[self.testing_environment]['command']
    194194        # Add eventual other parameters to the command by calling a
    195195        # function specific for the selected engine (rhino, phantomjs, etc.)
    196         if 'command_params_func' in self.envs[self.testing_enviroment]:
    197             command = self.envs[self.testing_enviroment]['command_params_func'](command)
     196        if 'command_params_func' in self.envs[self.testing_environment]:
     197            command = self.envs[self.testing_environment]['command_params_func'](command)
    198198        # if we were asked to test only some of the spec files,
    199199        # addd them to the command line:
     
    219219
    220220    def did_test_pass(self, stdout):
    221         if self.envs[self.testing_enviroment]['failed_mark'] in stdout:
     221        if self.envs[self.testing_environment]['failed_mark'] in stdout:
    222222            # it can happen that a test fails because of some timing issues
    223223            # (timer error). In such case it may happen that the test does
     
    231231        # tests passing ok
    232232        for line in stdout.splitlines():
    233             if self.envs[self.testing_enviroment]['success_mark'] in line:
     233            if self.envs[self.testing_environment]['success_mark'] in line:
    234234                return True
    235235        return False
  • pyenvjasmine/tests/test_runner.py

    r39 r42  
    1414        Test the runner, using default values (which wil run the demo specs)
    1515        """
    16         jstests = Runner(testing_enviroment='rhino')
     16        jstests = Runner(testing_environment='rhino')
    1717        success, stdout = jstests.run()
    1818        assert success
     
    2929        envjasmine_dir = os.path.join(os.path.dirname(here), 'envjasmine')
    3030        jstests = Runner(
    31             testing_enviroment='rhino',
     31            testing_environment='rhino',
    3232            rootdir=envjasmine_dir,
    3333            testdir=sample,
     
    5151        envjasmine_dir = os.path.join(os.path.dirname(here), 'envjasmine')
    5252        jstests = Runner(
    53             testing_enviroment='rhino',
     53            testing_environment='rhino',
    5454            rootdir=envjasmine_dir,
    5555            testdir=sample,
     
    7373        envjasmine_dir = os.path.join(os.path.dirname(here), 'envjasmine')
    7474        jstests = Runner(
    75             testing_enviroment='rhino',
     75            testing_environment='rhino',
    7676            rootdir=envjasmine_dir,
    7777            testdir=sample,
     
    103103        # but we want to test also the case when a test failed
    104104        # and it does not appear in the "Failed:" report
    105         jstests = Runner(testing_enviroment='rhino')
     105        jstests = Runner(testing_environment='rhino')
    106106        success = jstests.did_test_pass('')
    107107        assert not success
     
    144144        envjasmine_dir = os.path.join(os.path.dirname(here), 'envjasmine')
    145145        jstests = Runner(
    146             testing_enviroment='phantomjs',
     146            testing_environment='phantomjs',
    147147            rootdir=envjasmine_dir,
    148148            testdir=sample,
     
    169169        envjasmine_dir = os.path.join(os.path.dirname(here), 'envjasmine')
    170170        jstests = Runner(
    171             testing_enviroment='phantomjs',
     171            testing_environment='phantomjs',
    172172            rootdir=envjasmine_dir,
    173173            testdir=sample,
     
    187187
    188188        jstests = Runner(
    189             testing_enviroment='phantomjs',
     189            testing_environment='phantomjs',
    190190            browser_configfile=browser_conf_file
    191191        )
Note: See TracChangeset for help on using the changeset viewer.