Debian Codegraph @

behave.egg-info/PKG-INFO

raw
1 Metadata-Version: 1.2
2 Name: behave
3 Version: 1.2.6
4 Summary: behave is behaviour-driven development, Python style
5 Home-page: http://github.com/behave/behave
6 Author: Jens Engel, Benno Rice and Richard Jones
7 Author-email: [email protected]
8 License: BSD
9 Description-Content-Type: UNKNOWN
10 Description: .. image:: https://img.shields.io/travis/behave/behave/master.svg
11 :target: https://travis-ci.org/behave/behave
12 :alt: Travis CI Build Status
13
14 .. image:: https://readthedocs.org/projects/behave/badge/?version=latest
15 :target: http://behave.readthedocs.io/en/latest/?badge=latest
16 :alt: Documentation Status
17
18 .. image:: https://img.shields.io/pypi/v/behave.svg
19 :target: https://pypi.python.org/pypi/behave
20 :alt: Latest Version
21
22 .. image:: https://img.shields.io/pypi/dm/behave.svg
23 :target: https://pypi.python.org/pypi/behave
24 :alt: Downloads
25
26 .. image:: https://img.shields.io/pypi/l/behave.svg
27 :target: https://pypi.python.org/pypi/behave/
28 :alt: License
29
30 .. image:: https://badges.gitter.im/Join%20Chat.svg
31 :alt: Join the chat at https://gitter.im/behave/behave
32 :target: https://gitter.im/behave/behave?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
33
34
35 .. |logo| image:: https://raw.github.com/behave/behave/master/docs/_static/behave_logo1.png
36
37 behave is behavior-driven development, Python style.
38
39 |logo|
40
41 Behavior-driven development (or BDD) is an agile software development
42 technique that encourages collaboration between developers, QA and
43 non-technical or business participants in a software project.
44
45 *behave* uses tests written in a natural language style, backed up by Python
46 code.
47
48 First, `install *behave*.`_
49
50
51 Now make a directory called "features/".
52 In that directory create a file called "example.feature" containing:
53
54 .. code-block:: gherkin
55
56 # -- FILE: features/example.feature
57 Feature: Showing off behave
58
59 Scenario: Run a simple test
60 Given we have behave installed
61 When we implement 5 tests
62 Then behave will test them for us!
63
64 Make a new directory called "features/steps/".
65 In that directory create a file called "example_steps.py" containing:
66
67 .. code-block:: python
68
69 # -- FILE: features/steps/example_steps.py
70 from behave import given, when, then, step
71
72 @given('we have behave installed')
73 def step_impl(context):
74 pass
75
76 @when('we implement {number:d} tests')
77 def step_impl(context, number): # -- NOTE: number is converted into integer
78 assert number > 1 or number == 0
79 context.tests_count = number
80
81 @then('behave will test them for us!')
82 def step_impl(context):
83 assert context.failed is False
84 assert context.tests_count >= 0
85
86 Run behave:
87
88 .. code-block:: bash
89
90 $ behave
91 Feature: Showing off behave # features/example.feature:2
92
93 Scenario: Run a simple test # features/example.feature:4
94 Given we have behave installed # features/steps/example_steps.py:4
95 When we implement 5 tests # features/steps/example_steps.py:8
96 Then behave will test them for us! # features/steps/example_steps.py:13
97
98 1 feature passed, 0 failed, 0 skipped
99 1 scenario passed, 0 failed, 0 skipped
100 3 steps passed, 0 failed, 0 skipped, 0 undefined
101
102 Now, continue reading to learn how to get the most out of *behave*. To get started,
103 we recommend the `tutorial`_ and then the `feature testing language`_ and
104 `api`_ references.
105
106
107 .. _`Install *behave*.`: http://pythonhosted.org/behave/install.html
108 .. _`tutorial`: http://pythonhosted.org/behave/tutorial.html#features
109 .. _`feature testing language`: http://pythonhosted.org/behave/gherkin.html
110 .. _`api`: http://pythonhosted.org/behave/api.html
111
112
113 More Information
114 -------------------------------------------------------------------------------
115
116 * `behave documentation`_: `latest edition`_, `stable edition`_, `PDF`_
117 * `behave.example`_: Behave Examples and Tutorials (docs, executable examples).
118 * `changelog`_ (latest changes)
119
120
121 .. _behave documentation: http://behave.readthedocs.io/
122 .. _changelog: https://github.com/behave/behave/blob/master/CHANGES.rst
123 .. _behave.example: https://github.com/behave/behave.example
124
125 .. _`latest edition`: http://behave.readthedocs.io/en/latest/
126 .. _`stable edition`: http://behave.readthedocs.io/en/stable/
127 .. _PDF: https://media.readthedocs.org/pdf/behave/latest/behave.pdf
128
129 Platform: UNKNOWN
130 Classifier: Development Status :: 4 - Beta
131 Classifier: Environment :: Console
132 Classifier: Intended Audience :: Developers
133 Classifier: Operating System :: OS Independent
134 Classifier: Programming Language :: Python :: 2
135 Classifier: Programming Language :: Python :: 2.6
136 Classifier: Programming Language :: Python :: 2.7
137 Classifier: Programming Language :: Python :: 3
138 Classifier: Programming Language :: Python :: 3.3
139 Classifier: Programming Language :: Python :: 3.4
140 Classifier: Programming Language :: Python :: 3.5
141 Classifier: Programming Language :: Python :: 3.6
142 Classifier: Programming Language :: Python :: Implementation :: CPython
143 Classifier: Programming Language :: Python :: Implementation :: Jython
144 Classifier: Programming Language :: Python :: Implementation :: PyPy
145 Classifier: Topic :: Software Development :: Testing
146 Classifier: License :: OSI Approved :: BSD License
147 Provides: behave
148 Provides: setuptools_behave
149 Requires-Python: >=2.6, !=3.0.*, !=3.1.*, !=3.2.*