Scenario case sensitivity #244

Open
SystemParadox opened this Issue Mar 30, 2012 · 3 comments

Comments

Projects
None yet
4 participants
@SystemParadox
Contributor

SystemParadox commented Mar 30, 2012

Feature: Scenario keyword case sensitivity
    Scenario: A normal scenario
    This will work

    sceNario: A weird scenario
    This will break, giving an unhelpful error message
Traceback (most recent call last):
  File ".../lettuce/registry.py", line 85, in call_hook
    callback(*args, **kw)
  File ".../lettuce/plugins/colored_shell_output.py", line 132, in print_scenario_running
    string = scenario.represented()
  File ".../lettuce/core.py", line 658, in represented
    return strings.rfill(head, self.feature.max_length + 1, append=u'# %s:%d\n' % (self.described_at.file, self.described_at.line))
TypeError: %d format: a number is required, not NoneType

The behaviour is identical for Scenario Outline.

If the Scenario keyword has the wrong case, it should either still work, or give a useful error.

@SystemParadox

This comment has been minimized.

Show comment Hide comment
@SystemParadox

SystemParadox Apr 11, 2012

Contributor

The same error is also produced with an unnamed Scenario Outline.

Contributor

SystemParadox commented Apr 11, 2012

The same error is also produced with an unnamed Scenario Outline.

@jdragojevic

This comment has been minimized.

Show comment Hide comment
@jdragojevic

jdragojevic May 7, 2012

You can also reproduce this by having 2 or more spaces after the Scenario: Scenario Outline:

ex:

Scenario: I type 1 space after the colon #this is OK

Scenario: I type 2 spaces after the colon #this failes

You can also reproduce this by having 2 or more spaces after the Scenario: Scenario Outline:

ex:

Scenario: I type 1 space after the colon #this is OK

Scenario: I type 2 spaces after the colon #this failes

@svenissimo

This comment has been minimized.

Show comment Hide comment
@svenissimo

svenissimo Jun 10, 2012

@SystemParadox I've sent a pull request with a fix for this issue.
@jdragojevic I've also made it insensitive to the number of spaces

@SystemParadox I've sent a pull request with a fix for this issue.
@jdragojevic I've also made it insensitive to the number of spaces

@ghost ghost assigned gabrielfalcao Jun 12, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment