aboutsummaryrefslogtreecommitdiffstats
path: root/xtesting/samples/features
diff options
context:
space:
mode:
authorDeepak Chandella <deepak.chandella@orange.com>2019-07-05 22:31:36 +0530
committerCédric Ollivier <cedric.ollivier@orange.com>2021-02-09 19:22:19 +0100
commit115092d35fdf9b449ff91e36cc2d668d39a8b257 (patch)
tree47105ccd2cede0686748031b7d42c6a705054269 /xtesting/samples/features
parenta707dbe72afa6398141d43135dc97ec32a40d412 (diff)
Adding first patch for behave feature
Change-Id: Ic975c301103b49cdec2bd26746b708388f21e892 Signed-off-by: Deepak Chandella <deepak.chandella@orange.com> (cherry picked from commit 5dd0d0ffd46e7665fddde8fd2f4da1a9b58506bb) (cherry picked from commit b7d72be6458dbe73e3893ba242fb2dd7a6c745fc)
Diffstat (limited to 'xtesting/samples/features')
-rw-r--r--xtesting/samples/features/hello.feature7
-rw-r--r--xtesting/samples/features/steps/hello.py16
2 files changed, 23 insertions, 0 deletions
diff --git a/xtesting/samples/features/hello.feature b/xtesting/samples/features/hello.feature
new file mode 100644
index 00000000..7975d28a
--- /dev/null
+++ b/xtesting/samples/features/hello.feature
@@ -0,0 +1,7 @@
+Feature: showing off behave
+
+ @foo
+ Scenario: run a simple test
+ Given we have behave installed
+ When we implement a test
+ Then behave will test it for us!
diff --git a/xtesting/samples/features/steps/hello.py b/xtesting/samples/features/steps/hello.py
new file mode 100644
index 00000000..8d780168
--- /dev/null
+++ b/xtesting/samples/features/steps/hello.py
@@ -0,0 +1,16 @@
+from behave import when, then, step
+
+
+class Hello():
+
+ @step('we have behave installed')
+ def step_impl_installation(context):
+ pass
+
+ @when('we implement a test')
+ def step_impl_test(context):
+ assert True is not False
+
+ @then('behave will test it for us!')
+ def step_impl_verify(context):
+ assert context.failed is False