Skip to content

Instantly share code, notes, and snippets.

@gabrielfalcao
Created September 6, 2011 15:34
Show Gist options
  • Save gabrielfalcao/1197879 to your computer and use it in GitHub Desktop.
Save gabrielfalcao/1197879 to your computer and use it in GitHub Desktop.
Cleaning up files that are already in .gitignore... OK!
Running unit tests ...
nose.plugins.cover: ERROR: Coverage not available: unable to import coverage module
Step definition takes a function and a step, keeps its definition relative path, and line + 1 (to consider the decorator) ... ok
Step description takes a line and filename, and keeps the relative path for filename ... ok
Scenario description takes a scenario, filename and a string, and keeps the relative path for filename and line ... ok
Feature description takes a feature, filename and original string, and keeps the relative path for filename, line and description lines ... ok
Step.represent_string behaviour when not defined ... ok
Step.represent_string behaviour when defined ... ok
Step.represent_hashes ... ok
Step.represent_hashes ... ok
Feature implements __repr__ nicely ... ok
It should extract the name string from the scenario ... ok
A feature object should have a list of scenarios ... ok
A feature object should have a description ... ok
Scenarios parsed by features has feature ... ok
The max length of a feature considering when the scenario is longer than the remaining things ... ok
The max length of a feature considering when one of the description lines of the feature is longer than the remaining things ... ok
The max length of a feature considering when the name of the feature is longer than the remaining things ... ok
The max length of a feature considering when the some of the step sentences is longer than the remaining things ... ok
The max length of a feature considering when the table of some of the steps is longer than the remaining things ... ok
The max length of a feature considering when the table keys of some of the steps are longer than the remaining things ... ok
The max length of a feature considering when the table of some of the scenario oulines is longer than the remaining things ... ok
The max length of a feature considering when the table keys of the scenario oulines are longer than the remaining things ... ok
Can parse the description on long named features ... ok
Can parse the description on long sentenced steps ... ok
It should ignore lines that start with #, despite white spaces ... ok
FileSystem stack list ... ok
FileSystem stack list has different lifecycle in FileSystem objects ... ok
Default behaviour of pushd() is adding the current dir to the stack ... ok
FileSystem.pushd ... ok
FileSystem.popd with more than 1 item ... ok
FileSystem.pop behaviour with only one item ... ok
FileSystem.pop behaviour without items in stack ... ok
FileSystem.filename with extension ... ok
FileSystem.filename without extension ... ok
FileSystem.dirname ... ok
FileSystem.exists ... ok
FileSystem.extract_zip non-verbose ... ok
FileSystem.extract_zip verbose ... ok
FileSystem.locate non-recursive ... ok
FileSystem.locate recursive ... ok
FileSystem.mkdir with success ... ok
FileSystem.mkdir in a existent dir ... ok
FileSystem.mkdir raises on errno not 17 ... ok
Language class is english by default ... ok
Language() can pick up first occurrece of a string ... ok
Language: PT-BR -> Language class supports portuguese through code "pt-br" ... ok
Language: PT-BR -> Scenario.from_string ... ok
Language: PT-BR -> Scenario.from_string, with scenario outline, first case ... ok
Language: PT-BR -> Scenario.from_string, with scenario outline, second case ... ok
Language: PT-BR -> Feature.from_string ... ok
A nice python module is supposed to have a version ... ok
lettuce importer does import ... ok
lettuce error tries to import ... ok
It should extract the name of the scenario ... ok
Scenario implements __repr__ nicely ... ok
A scenario object should have a list of steps ... ok
A scenario may own outlines ... ok
Steps parsed by scenarios has scenarios ... ok
A scenario with outlines may solve its sentences ... ok
Outline substitution should apply to tables within a scenario ... ok
Steps solved in scenario outlines also have scenario as attribute ... ok
Solving scenario outlines within a feature ... ok
Solving scenarios within a full-featured feature ... ok
A step table imediately after the scenario line, without step line fails ... ok
Comments on scenario example should be ignored ... ok
All scenario's examples block should be translated to outlines ... ok
A scenario string that contains lines starting with '#' will be commented ... ok
Step implements __repr__ nicely ... ok
It should extract the sentence string from the whole step ... ok
It should take the keys from the step, if it has a table ... ok
It should have a list of data from a given step, if it has a table ... ok
It should extract a single ordinary step correctly into an array of steps ... ok
It should extract a single tabular step correctly into an array of steps ... ok
It should correctly extract two steps (one regular, one tabular) into an array. ... ok
It should correctly extract two steps (one tabular, one regular) into an array. ... ok
It should correctly extract two ordinary steps into an array. ... ok
It should raise an error when a step starts with a multiline string ... ok
It should correctly parse a multi-line string as part of the preceding step ... ok
tests.unit.test_step_parsing.test_multiline_is_parsed ... ok
tests.unit.test_step_parsing.test_multiline_with_whitespace ... ok
Step.hashes objects should have a ".first" attribute that gives the first row (dict) of the "hashes" list ... ok
Step().hashes.first should raise a assertion error if the list is empty ... ok
Step.hashes objects should have a ".last" attribute that gives the last row (dict) of the "hashes" list ... ok
Step().hashes.last should raise a assertion error if the list is empty ... ok
Step.hashes.values_under should be a method that gives a list of members ... ok
Step.hashes.values_under raises AssertionError if the key does not exist ... ok
The scenario result has the steps passed, failed and skipped steps. And total steps as well. ... ok
The scenario result has also the undefined steps. ... ok
It can figure out why the test has failed ... ok
Skipped steps can be retrieved as steps ... ok
By default lettuce ignore case on step definitions ... ok
Lettuce can, optionally consider case on step definitions ... ok
Steps are aware of its definitions line numbers and file names ... ok
Steps that match groups takes them as parameters ... ok
Steps that match named groups takes them as parameters ... ok
Steps that match groups and named groups takes just the named as parameters ... ok
Step definitions takes step object as first argument ... ok
Features can run only specified scenarios, by index + 1 ... ok
When a step definition raises an exception, it is marked as a failed step. ... ok
tests.unit.test_step_runner.test_step_runs_subordinate_step_with_given ... ok
tests.unit.test_step_runner.test_step_runs_subordinate_step_with_then ... ok
tests.unit.test_step_runner.test_step_runs_subordinate_step_with_when ... ok
When a step definition calls two subordinate step definitions (that do not fail), both should run. ... ok
When a step definition calls another (successful) step definition with behave_as, that step should be a success. ... ok
When a step definition calls another (successful) step definition with behave_as, that step should not be marked a failure. ... ok
When a step definition calls another (failing) step definition with behave_as, that step should not be marked as success. ... ok
When a step definition calls another (failing) step definition with behave_as, that step should be marked a failure. ... ok
When a step definition calls an undefined step definition with behave_as, that step should not be marked as success. ... ok
When a step definition calls an undefined step definition with behave_as, that step should be marked a failure. ... ok
When a step definition calls another (failing) step definition with behave_as, that step should be marked a failure. ... ok
When a step definition calls another step definition with behave_as, the step called using behave_as should have access to the current scenario ... ok
tests.unit.test_step_runner.test_invalid_regex_raise_an_error ... ok
strings.escape_if_necessary escapes regex if has only one char ... ok
Escape if necessary does nothing if the string has more than 1 char ... ok
strings.get_stripped_lines strip every line, and jump empty ones ... ok
strings.get_stripped_lines ignore lines that start with some char ... ok
strings.split_wisely splits ignoring case ... ok
strings.split_wisely splits ignoring case and stripping ... ok
strings.wise_startswith ignores case ... ok
strings.wise_startswith ignores case ... ok
strings.remove_it accepts regex and remove all matches from string ... ok
strings.column_width ... ok
strings.rfill simple case ... ok
strings.rfill empty ... ok
strings.rfill blank ... ok
strings.rfill full ... ok
strings.rfill append ... ok
strings.dicts_to_string ... ok
strings.dicts_to_string escapes pipe ... ok
strings.dicts_to_string allows empty ... ok
strings.parse_hashes ... ok
strings.parse_hashes escapes pipe ... ok
strings.parse_hashes allow empty ... ok
lettuce.terrain.world can be monkey patched at will ... ok
terrain.before.each_step and terrain.after.each_step decorators ... ok
terrain.before.each_scenario and terrain.after.each_scenario decorators ... ok
terrain.before.each_feature and terrain.after.each_feature decorators ... ok
terrain.before.each_all and terrain.after.each_all decorators ... ok
world should be able to absorb functions ... ok
world should be able to absorb lambdas ... ok
world should be able to absorb classs ... ok
----------------------------------------------------------------------
Ran 140 tests in 0.147s
OK
[<Step: "I have a string like so:">]
Running functional tests ...
nose.plugins.cover: ERROR: Coverage not available: unable to import coverage module
Language: ja -> sucess colorless ... ok
Language: ja -> sucess table colorless ... ok
Language: ja -> sucess outlines colorless ... ok
Language: ja -> sucess outlines colorful ... ok
Language: pt-br -> sucess colorless ... ok
Language: pt-br -> sucess table colorless ... ok
Language: pt-br -> sucess outlines colorless ... ok
Language: pt-br -> sucess outlines colorful ... ok
Basic step.behave_as behaviour is working ... ok
Basic step.behave_as behaviour is working ... ok
Basic step.behave_as behaviour is working ... ok
FeatureLoader finds all feature files within a directory ... ok
Feature.from_file loads feature by filename ... ok
Feature.from_file sets FeatureDescription into Feature objects, giving line number and filename as well ... ok
Feature.from_file sets FeatureDescription with line numbers of its description ... ok
Feature.from_file sets ScenarioDescription into Scenario objects, giving line number and filename as well ... ok
Feature.from_file sets StepDescription into Scenario objects, giving line number and filename as well ... ok
tests.functional.test_file_system.test_abspath ... ok
tests.functional.test_file_system.test_relpath ... ok
tests.functional.test_file_system.test_current_dir_with_join ... ok
tests.functional.test_file_system.test_current_dir_without_join ... ok
tests.functional.test_file_system.test_join ... ok
tests.functional.test_file_system.test_dirname ... ok
tests.functional.test_file_system.test_recursive_locate ... ok
tests.functional.test_file_system.test_non_recursive_locate ... ok
tests.functional.test_file_system.test_open_non_abspath ... ok
tests.functional.test_file_system.test_open_abspath ... ok
tests.functional.test_file_system.test_open_raw_non_abspath ... ok
tests.functional.test_file_system.test_open_raw_abspath ... ok
Runner tries to import terrain, but has a nice output when it fail ... ok
Feature represented without colors ... ok
Scenario Outline represented without colors ... ok
Scenario represented without colors ... ok
Undefined step represented without colors ... ok
Defined step represented without colors ... ok
A feature with two scenarios should separate the two scenarios with a new line (in colorless mode). ... ok
Testing the output of a successful feature ... ok
A feature with two scenarios should separate the two scenarios with a new line (in color mode). ... ok
Testing the output of many successful features ... ok
Testing the colorful output of many successful features ... ok
Testing the colorful output of many successful features ... ok
Testing the colorful output of many successful features colorless ... ok
Testing the colorful output of many successful features colorless ... ok
Testing the colorless output of success with table ... ok
Testing the colorful output of success with table ... ok
Testing the colorless output of failed with table ... FAIL
Testing the colorful output of failed with table ... FAIL
With colorless output, a successful outline scenario should print beautifully. ... ok
With colored output, a successful outline scenario should print beautifully. ... ok
With colorless output, an unsuccessful outline scenario should print beautifully. ... ok
With colored output, an unsuccessful outline scenario should print beautifully. ... ok
syntax checking: Fail if a file has more than one feature ... ok
syntax checking: Fail on features without name ... ok
Testing that the proposed snippet is clever enough to identify groups within double quotes. colorless ... FAIL
Testing that the proposed snippet is clever enough to identify groups within double quotes. colorful ... FAIL
Testing that the proposed snippet is clever enough to identify groups within single quotes. colorless ... FAIL
Testing that the proposed snippet is clever enough to identify groups within single quotes. colorful ... FAIL
Testing that the proposed snippet is clever enough to avoid duplicating the same snippet ... FAIL
Testing that the proposed snippet is clever enough normalize method names even with latin accents ... FAIL
Output with verbosity 2 must show only the scenario names, followed by "... OK" in case of success ... ok
Output with verbosity 2 must show only the scenario names, followed by "... FAILED" in case of fail ... ok
Output with verbosity 2 must show only the scenario names, followed by "... ERROR" in case of fail ... ok
Output with verbosity 2 must show only the scenario names, followed by "... OK" in case of success ... ok
Output with verbosity 2 must show only the scenario names, followed by "... FAILED" in case of fail ... ok
Output with verbosity 2 must show only the scenario names, followed by "... ERROR" in case of fail ... ok
Test one commented scenario ... ok
syntax checking: Blank in step hash column = empty string ... ok
Can load step definitions from step_definitions folder ... ok
If don't find a step_definitions folder, fallback loading all python files under given dir, recursively. ... ok
If a module has a invalid file name, we just discard it ... ok
tests.functional.test_terrain.test_imports_terrain_under_path_that_is_run ... ok
terrain.before.each_all and terrain.after.each_all decorators ... ok
Test xunit output with no errors ... ok
Test xunit output with one errors ... ok
Test xunit output with different filename ... ok
======================================================================
FAIL: Testing the colorless output of failed with table
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/gabrielfalcao/.virtualenvs/lettuce/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/Users/gabrielfalcao/Dropbox/projects/personal/lettuce/tests/functional/test_runner.py", line 455, in test_output_with_failed_colorless_with_table
'call_line':call_line,
File "/Users/gabrielfalcao/Dropbox/projects/personal/lettuce/tests/asserts.py", line 88, in assert_stdout_lines_with_traceback
assert_lines_with_traceback(sys.stdout.getvalue(), other)
File "/Users/gabrielfalcao/Dropbox/projects/personal/lettuce/tests/asserts.py", line 63, in assert_lines_with_traceback
assert_unicode_equals(line1, line2)
File "/Users/gabrielfalcao/Dropbox/projects/personal/lettuce/tests/asserts.py", line 71, in assert_unicode_equals
assert_equals(original, expected)
AssertionError: u'def and_this_one_does_not_even_has_definition(current_step):' != 'def and_this_one_does_not_even_has_definition(step):'
======================================================================
FAIL: Testing the colorful output of failed with table
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/gabrielfalcao/.virtualenvs/lettuce/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/Users/gabrielfalcao/Dropbox/projects/personal/lettuce/tests/functional/test_runner.py", line 502, in test_output_with_failed_colorful_with_table
'call_line':call_line,
File "/Users/gabrielfalcao/Dropbox/projects/personal/lettuce/tests/asserts.py", line 88, in assert_stdout_lines_with_traceback
assert_lines_with_traceback(sys.stdout.getvalue(), other)
File "/Users/gabrielfalcao/Dropbox/projects/personal/lettuce/tests/asserts.py", line 63, in assert_lines_with_traceback
assert_unicode_equals(line1, line2)
File "/Users/gabrielfalcao/Dropbox/projects/personal/lettuce/tests/asserts.py", line 71, in assert_unicode_equals
assert_equals(original, expected)
AssertionError: u'def and_this_one_does_not_even_has_definition(current_step):' != 'def and_this_one_does_not_even_has_definition(step):'
======================================================================
FAIL: Testing that the proposed snippet is clever enough to identify groups within double quotes. colorless
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/gabrielfalcao/.virtualenvs/lettuce/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/Users/gabrielfalcao/Dropbox/projects/personal/lettuce/tests/functional/test_runner.py", line 702, in test_output_snippets_with_groups_within_double_quotes_colorless
u'\n'
File "/Users/gabrielfalcao/Dropbox/projects/personal/lettuce/tests/asserts.py", line 82, in assert_stdout_lines
assert_lines(sys.stdout.getvalue(), other)
File "/Users/gabrielfalcao/Dropbox/projects/personal/lettuce/tests/asserts.py", line 40, in assert_lines
assert_lines_unicode(original, expected)
File "/Users/gabrielfalcao/Dropbox/projects/personal/lettuce/tests/asserts.py", line 45, in assert_lines_unicode
raise AssertionError, 'Output differed as follows:\n' + diff + "\nOutput was:\n" + original +"\nExpected was:\n"+expected
AssertionError: Output differed as follows:
Feature: double-quoted snippet proposal # tests/functional/output_features/double-quoted-snippet/double-quoted-snippet.feature:1
Scenario: Propose matched groups # tests/functional/output_features/double-quoted-snippet/double-quoted-snippet.feature:2
Given I have "stuff here" and "more @#$%\u02c6& bizar sutff h3r3" # tests/functional/output_features/double-quoted-snippet/double-quoted-snippet.feature:3 (undefined)
1 feature (0 passed)
1 scenario (0 passed)
1 step (1 undefined, 0 passed)
You can implement step definitions for undefined steps with these snippets:
# -*- coding: utf-8 -*-
from lettuce import step
@step(u'Given I have "([^"]*)" and "([^"]*)"')
- def given_i_have_group1_and_group2(step, group1, group2):
+ def given_i_have_group1_and_group2(current_step, group1, group2):
? ++++++++
assert False, 'This step must be implemented'
Output was:
Feature: double-quoted snippet proposal # tests/functional/output_features/double-quoted-snippet/double-quoted-snippet.feature:1
Scenario: Propose matched groups # tests/functional/output_features/double-quoted-snippet/double-quoted-snippet.feature:2
Given I have "stuff here" and "more @#$%\u02c6& bizar sutff h3r3" # tests/functional/output_features/double-quoted-snippet/double-quoted-snippet.feature:3 (undefined)
1 feature (0 passed)
1 scenario (0 passed)
1 step (1 undefined, 0 passed)
You can implement step definitions for undefined steps with these snippets:
# -*- coding: utf-8 -*-
from lettuce import step
@step(u'Given I have "([^"]*)" and "([^"]*)"')
def given_i_have_group1_and_group2(current_step, group1, group2):
assert False, 'This step must be implemented'
Expected was:
Feature: double-quoted snippet proposal # tests/functional/output_features/double-quoted-snippet/double-quoted-snippet.feature:1
Scenario: Propose matched groups # tests/functional/output_features/double-quoted-snippet/double-quoted-snippet.feature:2
Given I have "stuff here" and "more @#$%\u02c6& bizar sutff h3r3" # tests/functional/output_features/double-quoted-snippet/double-quoted-snippet.feature:3 (undefined)
1 feature (0 passed)
1 scenario (0 passed)
1 step (1 undefined, 0 passed)
You can implement step definitions for undefined steps with these snippets:
# -*- coding: utf-8 -*-
from lettuce import step
@step(u'Given I have "([^"]*)" and "([^"]*)"')
def given_i_have_group1_and_group2(step, group1, group2):
assert False, 'This step must be implemented'
======================================================================
FAIL: Testing that the proposed snippet is clever enough to identify groups within double quotes. colorful
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/gabrielfalcao/.virtualenvs/lettuce/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/Users/gabrielfalcao/Dropbox/projects/personal/lettuce/tests/functional/test_runner.py", line 730, in test_output_snippets_with_groups_within_double_quotes_colorful
u'\n'
File "/Users/gabrielfalcao/Dropbox/projects/personal/lettuce/tests/asserts.py", line 82, in assert_stdout_lines
assert_lines(sys.stdout.getvalue(), other)
File "/Users/gabrielfalcao/Dropbox/projects/personal/lettuce/tests/asserts.py", line 40, in assert_lines
assert_lines_unicode(original, expected)
File "/Users/gabrielfalcao/Dropbox/projects/personal/lettuce/tests/asserts.py", line 45, in assert_lines_unicode
raise AssertionError, 'Output differed as follows:\n' + diff + "\nOutput was:\n" + original +"\nExpected was:\n"+expected
AssertionError: Output differed as follows:
Feature: double-quoted snippet proposal # tests/functional/output_features/double-quoted-snippet/double-quoted-snippet.feature:1
 Scenario: Propose matched groups # tests/functional/output_features/double-quoted-snippet/double-quoted-snippet.feature:2
 Given I have "stuff here" and "more @#$%\u02c6& bizar sutff h3r3" # tests/functional/output_features/double-quoted-snippet/double-quoted-snippet.feature:3
1 feature (0 passed)
1 scenario (0 passed)
1 step (1 undefined, 0 passed)
You can implement step definitions for undefined steps with these snippets:
# -*- coding: utf-8 -*-
from lettuce import step
@step(u'Given I have "([^"]*)" and "([^"]*)"')
- def given_i_have_group1_and_group2(step, group1, group2):
+ def given_i_have_group1_and_group2(current_step, group1, group2):
? ++++++++
assert False, 'This step must be implemented'
Output was:
Feature: double-quoted snippet proposal # tests/functional/output_features/double-quoted-snippet/double-quoted-snippet.feature:1
 Scenario: Propose matched groups # tests/functional/output_features/double-quoted-snippet/double-quoted-snippet.feature:2
 Given I have "stuff here" and "more @#$%\u02c6& bizar sutff h3r3" # tests/functional/output_features/double-quoted-snippet/double-quoted-snippet.feature:3
1 feature (0 passed)
1 scenario (0 passed)
1 step (1 undefined, 0 passed)
You can implement step definitions for undefined steps with these snippets:
# -*- coding: utf-8 -*-
from lettuce import step
@step(u'Given I have "([^"]*)" and "([^"]*)"')
def given_i_have_group1_and_group2(current_step, group1, group2):
assert False, 'This step must be implemented'
Expected was:
Feature: double-quoted snippet proposal # tests/functional/output_features/double-quoted-snippet/double-quoted-snippet.feature:1
 Scenario: Propose matched groups # tests/functional/output_features/double-quoted-snippet/double-quoted-snippet.feature:2
 Given I have "stuff here" and "more @#$%\u02c6& bizar sutff h3r3" # tests/functional/output_features/double-quoted-snippet/double-quoted-snippet.feature:3
1 feature (0 passed)
1 scenario (0 passed)
1 step (1 undefined, 0 passed)
You can implement step definitions for undefined steps with these snippets:
# -*- coding: utf-8 -*-
from lettuce import step
@step(u'Given I have "([^"]*)" and "([^"]*)"')
def given_i_have_group1_and_group2(step, group1, group2):
assert False, 'This step must be implemented'
======================================================================
FAIL: Testing that the proposed snippet is clever enough to identify groups within single quotes. colorless
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/gabrielfalcao/.virtualenvs/lettuce/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/Users/gabrielfalcao/Dropbox/projects/personal/lettuce/tests/functional/test_runner.py", line 759, in test_output_snippets_with_groups_within_single_quotes_colorless
u'\n'
File "/Users/gabrielfalcao/Dropbox/projects/personal/lettuce/tests/asserts.py", line 82, in assert_stdout_lines
assert_lines(sys.stdout.getvalue(), other)
File "/Users/gabrielfalcao/Dropbox/projects/personal/lettuce/tests/asserts.py", line 40, in assert_lines
assert_lines_unicode(original, expected)
File "/Users/gabrielfalcao/Dropbox/projects/personal/lettuce/tests/asserts.py", line 45, in assert_lines_unicode
raise AssertionError, 'Output differed as follows:\n' + diff + "\nOutput was:\n" + original +"\nExpected was:\n"+expected
AssertionError: Output differed as follows:
Feature: single-quoted snippet proposal # tests/functional/output_features/single-quoted-snippet/single-quoted-snippet.feature:1
Scenario: Propose matched groups # tests/functional/output_features/single-quoted-snippet/single-quoted-snippet.feature:2
Given I have 'stuff here' and 'more @#$%\u02c6& bizar sutff h3r3' # tests/functional/output_features/single-quoted-snippet/single-quoted-snippet.feature:3 (undefined)
1 feature (0 passed)
1 scenario (0 passed)
1 step (1 undefined, 0 passed)
You can implement step definitions for undefined steps with these snippets:
# -*- coding: utf-8 -*-
from lettuce import step
@step(u'Given I have \'([^\']*)\' and \'([^\']*)\'')
- def given_i_have_group1_and_group2(step, group1, group2):
+ def given_i_have_group1_and_group2(current_step, group1, group2):
? ++++++++
assert False, 'This step must be implemented'
Output was:
Feature: single-quoted snippet proposal # tests/functional/output_features/single-quoted-snippet/single-quoted-snippet.feature:1
Scenario: Propose matched groups # tests/functional/output_features/single-quoted-snippet/single-quoted-snippet.feature:2
Given I have 'stuff here' and 'more @#$%\u02c6& bizar sutff h3r3' # tests/functional/output_features/single-quoted-snippet/single-quoted-snippet.feature:3 (undefined)
1 feature (0 passed)
1 scenario (0 passed)
1 step (1 undefined, 0 passed)
You can implement step definitions for undefined steps with these snippets:
# -*- coding: utf-8 -*-
from lettuce import step
@step(u'Given I have \'([^\']*)\' and \'([^\']*)\'')
def given_i_have_group1_and_group2(current_step, group1, group2):
assert False, 'This step must be implemented'
Expected was:
Feature: single-quoted snippet proposal # tests/functional/output_features/single-quoted-snippet/single-quoted-snippet.feature:1
Scenario: Propose matched groups # tests/functional/output_features/single-quoted-snippet/single-quoted-snippet.feature:2
Given I have 'stuff here' and 'more @#$%\u02c6& bizar sutff h3r3' # tests/functional/output_features/single-quoted-snippet/single-quoted-snippet.feature:3 (undefined)
1 feature (0 passed)
1 scenario (0 passed)
1 step (1 undefined, 0 passed)
You can implement step definitions for undefined steps with these snippets:
# -*- coding: utf-8 -*-
from lettuce import step
@step(u'Given I have \'([^\']*)\' and \'([^\']*)\'')
def given_i_have_group1_and_group2(step, group1, group2):
assert False, 'This step must be implemented'
======================================================================
FAIL: Testing that the proposed snippet is clever enough to identify groups within single quotes. colorful
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/gabrielfalcao/.virtualenvs/lettuce/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/Users/gabrielfalcao/Dropbox/projects/personal/lettuce/tests/functional/test_runner.py", line 787, in test_output_snippets_with_groups_within_single_quotes_colorful
u'\n'
File "/Users/gabrielfalcao/Dropbox/projects/personal/lettuce/tests/asserts.py", line 82, in assert_stdout_lines
assert_lines(sys.stdout.getvalue(), other)
File "/Users/gabrielfalcao/Dropbox/projects/personal/lettuce/tests/asserts.py", line 40, in assert_lines
assert_lines_unicode(original, expected)
File "/Users/gabrielfalcao/Dropbox/projects/personal/lettuce/tests/asserts.py", line 45, in assert_lines_unicode
raise AssertionError, 'Output differed as follows:\n' + diff + "\nOutput was:\n" + original +"\nExpected was:\n"+expected
AssertionError: Output differed as follows:
Feature: single-quoted snippet proposal # tests/functional/output_features/single-quoted-snippet/single-quoted-snippet.feature:1
 Scenario: Propose matched groups # tests/functional/output_features/single-quoted-snippet/single-quoted-snippet.feature:2
 Given I have 'stuff here' and 'more @#$%\u02c6& bizar sutff h3r3' # tests/functional/output_features/single-quoted-snippet/single-quoted-snippet.feature:3
1 feature (0 passed)
1 scenario (0 passed)
1 step (1 undefined, 0 passed)
You can implement step definitions for undefined steps with these snippets:
# -*- coding: utf-8 -*-
from lettuce import step
@step(u'Given I have \'([^\']*)\' and \'([^\']*)\'')
- def given_i_have_group1_and_group2(step, group1, group2):
+ def given_i_have_group1_and_group2(current_step, group1, group2):
? ++++++++
assert False, 'This step must be implemented'
Output was:
Feature: single-quoted snippet proposal # tests/functional/output_features/single-quoted-snippet/single-quoted-snippet.feature:1
 Scenario: Propose matched groups # tests/functional/output_features/single-quoted-snippet/single-quoted-snippet.feature:2
 Given I have 'stuff here' and 'more @#$%\u02c6& bizar sutff h3r3' # tests/functional/output_features/single-quoted-snippet/single-quoted-snippet.feature:3
1 feature (0 passed)
1 scenario (0 passed)
1 step (1 undefined, 0 passed)
You can implement step definitions for undefined steps with these snippets:
# -*- coding: utf-8 -*-
from lettuce import step
@step(u'Given I have \'([^\']*)\' and \'([^\']*)\'')
def given_i_have_group1_and_group2(current_step, group1, group2):
assert False, 'This step must be implemented'
Expected was:
Feature: single-quoted snippet proposal # tests/functional/output_features/single-quoted-snippet/single-quoted-snippet.feature:1
 Scenario: Propose matched groups # tests/functional/output_features/single-quoted-snippet/single-quoted-snippet.feature:2
 Given I have 'stuff here' and 'more @#$%\u02c6& bizar sutff h3r3' # tests/functional/output_features/single-quoted-snippet/single-quoted-snippet.feature:3
1 feature (0 passed)
1 scenario (0 passed)
1 step (1 undefined, 0 passed)
You can implement step definitions for undefined steps with these snippets:
# -*- coding: utf-8 -*-
from lettuce import step
@step(u'Given I have \'([^\']*)\' and \'([^\']*)\'')
def given_i_have_group1_and_group2(step, group1, group2):
assert False, 'This step must be implemented'
======================================================================
FAIL: Testing that the proposed snippet is clever enough to avoid duplicating the same snippet
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/gabrielfalcao/.virtualenvs/lettuce/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/Users/gabrielfalcao/Dropbox/projects/personal/lettuce/tests/functional/test_runner.py", line 815, in test_output_snippets_with_groups_within_redundant_quotes
u'\n'
File "/Users/gabrielfalcao/Dropbox/projects/personal/lettuce/tests/asserts.py", line 82, in assert_stdout_lines
assert_lines(sys.stdout.getvalue(), other)
File "/Users/gabrielfalcao/Dropbox/projects/personal/lettuce/tests/asserts.py", line 40, in assert_lines
assert_lines_unicode(original, expected)
File "/Users/gabrielfalcao/Dropbox/projects/personal/lettuce/tests/asserts.py", line 45, in assert_lines_unicode
raise AssertionError, 'Output differed as follows:\n' + diff + "\nOutput was:\n" + original +"\nExpected was:\n"+expected
AssertionError: Output differed as follows:
Feature: avoid duplicating same snippet # tests/functional/output_features/redundant-steps-quotes/redundant-steps-quotes.feature:1
Scenario: Propose matched groups # tests/functional/output_features/redundant-steps-quotes/redundant-steps-quotes.feature:2
Given I have "stuff here" and "more @#$%\u02c6& bizar sutff h3r3" # tests/functional/output_features/redundant-steps-quotes/redundant-steps-quotes.feature:3 (undefined)
Given I have "blablabla" and "12345" # tests/functional/output_features/redundant-steps-quotes/redundant-steps-quotes.feature:4 (undefined)
1 feature (0 passed)
1 scenario (0 passed)
2 steps (2 undefined, 0 passed)
You can implement step definitions for undefined steps with these snippets:
# -*- coding: utf-8 -*-
from lettuce import step
@step(u'Given I have "([^"]*)" and "([^"]*)"')
- def given_i_have_group1_and_group2(step, group1, group2):
+ def given_i_have_group1_and_group2(current_step, group1, group2):
? ++++++++
assert False, 'This step must be implemented'
Output was:
Feature: avoid duplicating same snippet # tests/functional/output_features/redundant-steps-quotes/redundant-steps-quotes.feature:1
Scenario: Propose matched groups # tests/functional/output_features/redundant-steps-quotes/redundant-steps-quotes.feature:2
Given I have "stuff here" and "more @#$%\u02c6& bizar sutff h3r3" # tests/functional/output_features/redundant-steps-quotes/redundant-steps-quotes.feature:3 (undefined)
Given I have "blablabla" and "12345" # tests/functional/output_features/redundant-steps-quotes/redundant-steps-quotes.feature:4 (undefined)
1 feature (0 passed)
1 scenario (0 passed)
2 steps (2 undefined, 0 passed)
You can implement step definitions for undefined steps with these snippets:
# -*- coding: utf-8 -*-
from lettuce import step
@step(u'Given I have "([^"]*)" and "([^"]*)"')
def given_i_have_group1_and_group2(current_step, group1, group2):
assert False, 'This step must be implemented'
Expected was:
Feature: avoid duplicating same snippet # tests/functional/output_features/redundant-steps-quotes/redundant-steps-quotes.feature:1
Scenario: Propose matched groups # tests/functional/output_features/redundant-steps-quotes/redundant-steps-quotes.feature:2
Given I have "stuff here" and "more @#$%\u02c6& bizar sutff h3r3" # tests/functional/output_features/redundant-steps-quotes/redundant-steps-quotes.feature:3 (undefined)
Given I have "blablabla" and "12345" # tests/functional/output_features/redundant-steps-quotes/redundant-steps-quotes.feature:4 (undefined)
1 feature (0 passed)
1 scenario (0 passed)
2 steps (2 undefined, 0 passed)
You can implement step definitions for undefined steps with these snippets:
# -*- coding: utf-8 -*-
from lettuce import step
@step(u'Given I have "([^"]*)" and "([^"]*)"')
def given_i_have_group1_and_group2(step, group1, group2):
assert False, 'This step must be implemented'
======================================================================
FAIL: Testing that the proposed snippet is clever enough normalize method names even with latin accents
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/gabrielfalcao/.virtualenvs/lettuce/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/Users/gabrielfalcao/Dropbox/projects/personal/lettuce/tests/functional/test_runner.py", line 844, in test_output_snippets_with_normalized_unicode_names
u"\n"
File "/Users/gabrielfalcao/Dropbox/projects/personal/lettuce/tests/asserts.py", line 82, in assert_stdout_lines
assert_lines(sys.stdout.getvalue(), other)
File "/Users/gabrielfalcao/Dropbox/projects/personal/lettuce/tests/asserts.py", line 40, in assert_lines
assert_lines_unicode(original, expected)
File "/Users/gabrielfalcao/Dropbox/projects/personal/lettuce/tests/asserts.py", line 45, in assert_lines_unicode
raise AssertionError, 'Output differed as follows:\n' + diff + "\nOutput was:\n" + original +"\nExpected was:\n"+expected
AssertionError: Output differed as follows:
Funcionalidade: melhorar o output de snippets do lettuce # tests/functional/output_features/latin-accents/latin-accents.feature:2
Como autor do lettuce # tests/functional/output_features/latin-accents/latin-accents.feature:3
Eu quero ter um output refinado de snippets # tests/functional/output_features/latin-accents/latin-accents.feature:4
Para melhorar, de uma forma geral, a vida do programador # tests/functional/output_features/latin-accents/latin-accents.feature:5
Cen\xe1rio: normalizar snippets com unicode # tests/functional/output_features/latin-accents/latin-accents.feature:7
Dado que eu tenho palavr\xf5es e outras situa\xe7\xf5es # tests/functional/output_features/latin-accents/latin-accents.feature:8 (undefined)
E v\xe1rias palavras acentuadas s\xe3o \xfateis, tais como: "(\xe9,n\xe3o,l\xe9o,choror\xf3,ch\xe1cara,ep\xedgrafo)" # tests/functional/output_features/latin-accents/latin-accents.feature:9 (undefined)
Ent\xe3o eu fico feliz\xe3o # tests/functional/output_features/latin-accents/latin-accents.feature:10 (undefined)
1 feature (0 passed)
1 scenario (0 passed)
3 steps (3 undefined, 0 passed)
You can implement step definitions for undefined steps with these snippets:
# -*- coding: utf-8 -*-
from lettuce import step
@step(u'Dado que eu tenho palavr\xf5es e outras situa\xe7\xf5es')
- def dado_que_eu_tenho_palavroes_e_outras_situacoes(step):
+ def dado_que_eu_tenho_palavroes_e_outras_situacoes(current_step):
? ++++++++
assert False, 'This step must be implemented'
@step(u'E v\xe1rias palavras acentuadas s\xe3o \xfateis, tais como: "([^"]*)"')
- def e_varias_palavras_acentuadas_sao_uteis_tais_como_group1(step, group1):
+ def e_varias_palavras_acentuadas_sao_uteis_tais_como_group1(current_step, group1):
? ++++++++
assert False, 'This step must be implemented'
@step(u'Ent\xe3o eu fico feliz\xe3o')
- def entao_eu_fico_felizao(step):
+ def entao_eu_fico_felizao(current_step):
? ++++++++
assert False, 'This step must be implemented'
Output was:
Funcionalidade: melhorar o output de snippets do lettuce # tests/functional/output_features/latin-accents/latin-accents.feature:2
Como autor do lettuce # tests/functional/output_features/latin-accents/latin-accents.feature:3
Eu quero ter um output refinado de snippets # tests/functional/output_features/latin-accents/latin-accents.feature:4
Para melhorar, de uma forma geral, a vida do programador # tests/functional/output_features/latin-accents/latin-accents.feature:5
Cen\xe1rio: normalizar snippets com unicode # tests/functional/output_features/latin-accents/latin-accents.feature:7
Dado que eu tenho palavr\xf5es e outras situa\xe7\xf5es # tests/functional/output_features/latin-accents/latin-accents.feature:8 (undefined)
E v\xe1rias palavras acentuadas s\xe3o \xfateis, tais como: "(\xe9,n\xe3o,l\xe9o,choror\xf3,ch\xe1cara,ep\xedgrafo)" # tests/functional/output_features/latin-accents/latin-accents.feature:9 (undefined)
Ent\xe3o eu fico feliz\xe3o # tests/functional/output_features/latin-accents/latin-accents.feature:10 (undefined)
1 feature (0 passed)
1 scenario (0 passed)
3 steps (3 undefined, 0 passed)
You can implement step definitions for undefined steps with these snippets:
# -*- coding: utf-8 -*-
from lettuce import step
@step(u'Dado que eu tenho palavr\xf5es e outras situa\xe7\xf5es')
def dado_que_eu_tenho_palavroes_e_outras_situacoes(current_step):
assert False, 'This step must be implemented'
@step(u'E v\xe1rias palavras acentuadas s\xe3o \xfateis, tais como: "([^"]*)"')
def e_varias_palavras_acentuadas_sao_uteis_tais_como_group1(current_step, group1):
assert False, 'This step must be implemented'
@step(u'Ent\xe3o eu fico feliz\xe3o')
def entao_eu_fico_felizao(current_step):
assert False, 'This step must be implemented'
Expected was:
Funcionalidade: melhorar o output de snippets do lettuce # tests/functional/output_features/latin-accents/latin-accents.feature:2
Como autor do lettuce # tests/functional/output_features/latin-accents/latin-accents.feature:3
Eu quero ter um output refinado de snippets # tests/functional/output_features/latin-accents/latin-accents.feature:4
Para melhorar, de uma forma geral, a vida do programador # tests/functional/output_features/latin-accents/latin-accents.feature:5
Cen\xe1rio: normalizar snippets com unicode # tests/functional/output_features/latin-accents/latin-accents.feature:7
Dado que eu tenho palavr\xf5es e outras situa\xe7\xf5es # tests/functional/output_features/latin-accents/latin-accents.feature:8 (undefined)
E v\xe1rias palavras acentuadas s\xe3o \xfateis, tais como: "(\xe9,n\xe3o,l\xe9o,choror\xf3,ch\xe1cara,ep\xedgrafo)" # tests/functional/output_features/latin-accents/latin-accents.feature:9 (undefined)
Ent\xe3o eu fico feliz\xe3o # tests/functional/output_features/latin-accents/latin-accents.feature:10 (undefined)
1 feature (0 passed)
1 scenario (0 passed)
3 steps (3 undefined, 0 passed)
You can implement step definitions for undefined steps with these snippets:
# -*- coding: utf-8 -*-
from lettuce import step
@step(u'Dado que eu tenho palavr\xf5es e outras situa\xe7\xf5es')
def dado_que_eu_tenho_palavroes_e_outras_situacoes(step):
assert False, 'This step must be implemented'
@step(u'E v\xe1rias palavras acentuadas s\xe3o \xfateis, tais como: "([^"]*)"')
def e_varias_palavras_acentuadas_sao_uteis_tais_como_group1(step, group1):
assert False, 'This step must be implemented'
@step(u'Ent\xe3o eu fico feliz\xe3o')
def entao_eu_fico_felizao(step):
assert False, 'This step must be implemented'
----------------------------------------------------------------------
Ran 75 tests in 0.725s
FAILED (failures=8)
make: *** [functional] Error 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment