How to use __init__ method in Gherkin-python

Best Python code snippet using gherkin-python

Run Gherkin-python automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

api_init_files_v1.bzl

Source: api_init_files_v1.bzl Github

copy
1"""TensorFlow V1 API __init__.py files."""
2
3# keep sorted
4TENSORFLOW_API_INIT_FILES_V1 = [
5    # BEGIN GENERATED FILES
6    "__init__.py",
7    "app/__init__.py",
8    "audio/__init__.py",
9    "autograph/__init__.py",
10    "autograph/experimental/__init__.py",
11    "bitwise/__init__.py",
12    "compat/__init__.py",
13    "config/__init__.py",
14    "config/experimental/__init__.py",
15    "config/optimizer/__init__.py",
16    "config/threading/__init__.py",
17    "data/__init__.py",
18    "data/experimental/__init__.py",
19    "debugging/__init__.py",
20    "distribute/__init__.py",
21    "distribute/cluster_resolver/__init__.py",
22    "distribute/experimental/__init__.py",
23    "distributions/__init__.py",
24    "dtypes/__init__.py",
25    "errors/__init__.py",
26    "experimental/__init__.py",
27    "feature_column/__init__.py",
28    "gfile/__init__.py",
29    "io/gfile/__init__.py",
30    "graph_util/__init__.py",
31    "image/__init__.py",
32    "io/__init__.py",
33    "queue/__init__.py",
34    "initializers/__init__.py",
35    "layers/__init__.py",
36    "layers/experimental/__init__.py",
37    "linalg/__init__.py",
38    "lite/__init__.py",
39    "lite/constants/__init__.py",
40    "lite/experimental/__init__.py",
41    "lite/experimental/nn/__init__.py",
42    "lite/experimental/microfrontend/__init__.py",
43    "lite/experimental/microfrontend/python/__init__.py",
44    "lite/experimental/microfrontend/python/ops/__init__.py",
45    "logging/__init__.py",
46    "lookup/__init__.py",
47    "lookup/experimental/__init__.py",
48    "losses/__init__.py",
49    "manip/__init__.py",
50    "math/__init__.py",
51    "metrics/__init__.py",
52    "mlir/__init__.py",
53    "mlir/experimental/__init__.py",
54    "nest/__init__.py",
55    "nn/__init__.py",
56    "nn/rnn_cell/__init__.py",
57    "profiler/__init__.py",
58    "python_io/__init__.py",
59    "quantization/__init__.py",
60    "ragged/__init__.py",
61    "random/__init__.py",
62    "random/experimental/__init__.py",
63    "raw_ops/__init__.py",
64    "resource_loader/__init__.py",
65    "strings/__init__.py",
66    "saved_model/__init__.py",
67    "saved_model/builder/__init__.py",
68    "saved_model/constants/__init__.py",
69    "saved_model/experimental/__init__.py",
70    "saved_model/loader/__init__.py",
71    "saved_model/main_op/__init__.py",
72    "saved_model/signature_constants/__init__.py",
73    "saved_model/signature_def_utils/__init__.py",
74    "saved_model/tag_constants/__init__.py",
75    "saved_model/utils/__init__.py",
76    "sets/__init__.py",
77    "signal/__init__.py",
78    "sparse/__init__.py",
79    "spectral/__init__.py",
80    "summary/__init__.py",
81    "sysconfig/__init__.py",
82    "test/__init__.py",
83    "tpu/experimental/__init__.py",
84    "tpu/__init__.py",
85    "train/__init__.py",
86    "train/experimental/__init__.py",
87    "train/queue_runner/__init__.py",
88    "user_ops/__init__.py",
89    "version/__init__.py",
90    "xla/__init__.py",
91    "xla/experimental/__init__.py",
92    # END GENERATED FILES
93]
94
95KERAS_API_INIT_FILES_V1 = [
96    "__init__.py",
97    "keras/__init__.py",
98    "keras/activations/__init__.py",
99    "keras/applications/__init__.py",
100    "keras/applications/densenet/__init__.py",
101    "keras/applications/imagenet_utils/__init__.py",
102    "keras/applications/inception_resnet_v2/__init__.py",
103    "keras/applications/inception_v3/__init__.py",
104    "keras/applications/mobilenet/__init__.py",
105    "keras/applications/mobilenet_v2/__init__.py",
106    "keras/applications/nasnet/__init__.py",
107    "keras/applications/resnet/__init__.py",
108    "keras/applications/resnet_v2/__init__.py",
109    "keras/applications/resnet50/__init__.py",
110    "keras/applications/vgg16/__init__.py",
111    "keras/applications/vgg19/__init__.py",
112    "keras/applications/xception/__init__.py",
113    "keras/backend/__init__.py",
114    "keras/callbacks/__init__.py",
115    "keras/constraints/__init__.py",
116    "keras/datasets/__init__.py",
117    "keras/datasets/boston_housing/__init__.py",
118    "keras/datasets/cifar10/__init__.py",
119    "keras/datasets/cifar100/__init__.py",
120    "keras/datasets/fashion_mnist/__init__.py",
121    "keras/datasets/imdb/__init__.py",
122    "keras/datasets/mnist/__init__.py",
123    "keras/datasets/reuters/__init__.py",
124    "keras/estimator/__init__.py",
125    "keras/experimental/__init__.py",
126    "keras/initializers/__init__.py",
127    "keras/layers/__init__.py",
128    "keras/layers/experimental/__init__.py",
129    "keras/losses/__init__.py",
130    "keras/metrics/__init__.py",
131    "keras/mixed_precision/__init__.py",
132    "keras/mixed_precision/experimental/__init__.py",
133    "keras/models/__init__.py",
134    "keras/optimizers/__init__.py",
135    "keras/optimizers/schedules/__init__.py",
136    "keras/premade/__init__.py",
137    "keras/preprocessing/__init__.py",
138    "keras/preprocessing/image/__init__.py",
139    "keras/preprocessing/sequence/__init__.py",
140    "keras/preprocessing/text/__init__.py",
141    "keras/regularizers/__init__.py",
142    "keras/utils/__init__.py",
143    "keras/wrappers/__init__.py",
144    "keras/wrappers/scikit_learn/__init__.py",
145]
146
Full Screen

api_init_files.bzl

Source: api_init_files.bzl Github

copy
1"""TensorFlow V2 API __init__.py files."""
2
3# keep sorted
4TENSORFLOW_API_INIT_FILES = [
5    # BEGIN GENERATED FILES
6    "__init__.py",
7    "audio/__init__.py",
8    "autograph/__init__.py",
9    "autograph/experimental/__init__.py",
10    "bitwise/__init__.py",
11    "compat/__init__.py",
12    "config/__init__.py",
13    "config/experimental/__init__.py",
14    "config/optimizer/__init__.py",
15    "config/threading/__init__.py",
16    "data/__init__.py",
17    "data/experimental/__init__.py",
18    "debugging/__init__.py",
19    "distribute/__init__.py",
20    "distribute/cluster_resolver/__init__.py",
21    "distribute/experimental/__init__.py",
22    "dtypes/__init__.py",
23    "errors/__init__.py",
24    "experimental/__init__.py",
25    "feature_column/__init__.py",
26    "io/gfile/__init__.py",
27    "graph_util/__init__.py",
28    "image/__init__.py",
29    "io/__init__.py",
30    "queue/__init__.py",
31    "linalg/__init__.py",
32    "lite/__init__.py",
33    "lite/experimental/__init__.py",
34    "lite/experimental/microfrontend/__init__.py",
35    "lite/experimental/microfrontend/python/__init__.py",
36    "lite/experimental/microfrontend/python/ops/__init__.py",
37    "lookup/__init__.py",
38    "lookup/experimental/__init__.py",
39    "math/__init__.py",
40    "mixed_precision/__init__.py",
41    "mixed_precision/experimental/__init__.py",
42    "mlir/__init__.py",
43    "mlir/experimental/__init__.py",
44    "nest/__init__.py",
45    "nn/__init__.py",
46    "quantization/__init__.py",
47    "ragged/__init__.py",
48    "random/__init__.py",
49    "random/experimental/__init__.py",
50    "raw_ops/__init__.py",
51    "saved_model/__init__.py",
52    "sets/__init__.py",
53    "signal/__init__.py",
54    "sparse/__init__.py",
55    "strings/__init__.py",
56    "summary/__init__.py",
57    "summary/experimental/__init__.py",
58    "sysconfig/__init__.py",
59    "test/__init__.py",
60    "tpu/experimental/__init__.py",
61    "tpu/__init__.py",
62    "train/__init__.py",
63    "train/experimental/__init__.py",
64    "version/__init__.py",
65    "xla/__init__.py",
66    "xla/experimental/__init__.py",
67    # END GENERATED FILES
68]
69
70KERAS_API_INIT_FILES = [
71    "__init__.py",
72    "keras/__init__.py",
73    "keras/activations/__init__.py",
74    "keras/applications/__init__.py",
75    "keras/applications/densenet/__init__.py",
76    "keras/applications/imagenet_utils/__init__.py",
77    "keras/applications/inception_resnet_v2/__init__.py",
78    "keras/applications/inception_v3/__init__.py",
79    "keras/applications/mobilenet/__init__.py",
80    "keras/applications/mobilenet_v2/__init__.py",
81    "keras/applications/nasnet/__init__.py",
82    "keras/applications/resnet/__init__.py",
83    "keras/applications/resnet_v2/__init__.py",
84    "keras/applications/resnet50/__init__.py",
85    "keras/applications/vgg16/__init__.py",
86    "keras/applications/vgg19/__init__.py",
87    "keras/applications/xception/__init__.py",
88    "keras/backend/__init__.py",
89    "keras/callbacks/__init__.py",
90    "keras/constraints/__init__.py",
91    "keras/datasets/__init__.py",
92    "keras/datasets/boston_housing/__init__.py",
93    "keras/datasets/cifar10/__init__.py",
94    "keras/datasets/cifar100/__init__.py",
95    "keras/datasets/fashion_mnist/__init__.py",
96    "keras/datasets/imdb/__init__.py",
97    "keras/datasets/mnist/__init__.py",
98    "keras/datasets/reuters/__init__.py",
99    "keras/estimator/__init__.py",
100    "keras/experimental/__init__.py",
101    "keras/initializers/__init__.py",
102    "keras/layers/__init__.py",
103    "keras/layers/experimental/__init__.py",
104    "keras/losses/__init__.py",
105    "keras/metrics/__init__.py",
106    "keras/mixed_precision/__init__.py",
107    "keras/mixed_precision/experimental/__init__.py",
108    "keras/premade/__init__.py",
109    "keras/models/__init__.py",
110    "keras/optimizers/__init__.py",
111    "keras/optimizers/schedules/__init__.py",
112    "keras/preprocessing/__init__.py",
113    "keras/preprocessing/image/__init__.py",
114    "keras/preprocessing/sequence/__init__.py",
115    "keras/preprocessing/text/__init__.py",
116    "keras/regularizers/__init__.py",
117    "keras/utils/__init__.py",
118    "keras/wrappers/__init__.py",
119    "keras/wrappers/scikit_learn/__init__.py",
120]
121
Full Screen

loader.py

Source: loader.py Github

copy
1
2__all__ = ['BaseLoader', 'FullLoader', 'SafeLoader', 'Loader', 'UnsafeLoader']
3
4from .reader import *
5from .scanner import *
6from .parser import *
7from .composer import *
8from .constructor import *
9from .resolver import *
10
11class BaseLoader(Reader, Scanner, Parser, Composer, BaseConstructor, BaseResolver):
12
13    def __init__(self, stream):
14        Reader.__init__(self, stream)
15        Scanner.__init__(self)
16        Parser.__init__(self)
17        Composer.__init__(self)
18        BaseConstructor.__init__(self)
19        BaseResolver.__init__(self)
20
21class FullLoader(Reader, Scanner, Parser, Composer, FullConstructor, Resolver):
22
23    def __init__(self, stream):
24        Reader.__init__(self, stream)
25        Scanner.__init__(self)
26        Parser.__init__(self)
27        Composer.__init__(self)
28        FullConstructor.__init__(self)
29        Resolver.__init__(self)
30
31class SafeLoader(Reader, Scanner, Parser, Composer, SafeConstructor, Resolver):
32
33    def __init__(self, stream):
34        Reader.__init__(self, stream)
35        Scanner.__init__(self)
36        Parser.__init__(self)
37        Composer.__init__(self)
38        SafeConstructor.__init__(self)
39        Resolver.__init__(self)
40
41class Loader(Reader, Scanner, Parser, Composer, Constructor, Resolver):
42
43    def __init__(self, stream):
44        Reader.__init__(self, stream)
45        Scanner.__init__(self)
46        Parser.__init__(self)
47        Composer.__init__(self)
48        Constructor.__init__(self)
49        Resolver.__init__(self)
50
51# UnsafeLoader is the same as Loader (which is and was always unsafe on
52# untrusted input). Use of either Loader or UnsafeLoader should be rare, since
53# FullLoad should be able to load almost all YAML safely. Loader is left intact
54# to ensure backwards compatibility.
55class UnsafeLoader(Reader, Scanner, Parser, Composer, Constructor, Resolver):
56
57    def __init__(self, stream):
58        Reader.__init__(self, stream)
59        Scanner.__init__(self)
60        Parser.__init__(self)
61        Composer.__init__(self)
62        Constructor.__init__(self)
63        Resolver.__init__(self)
64
Full Screen

Accelerate Your Automation Test Cycles With LambdaTest

Leverage LambdaTest’s cloud-based platform to execute your automation tests in parallel and trim down your test execution time significantly. Your first 100 automation testing minutes are on us.

Try LambdaTest

Run Python Tests on LambdaTest Cloud Grid

Execute automation tests with Gherkin-python on a cloud-based Grid of 3000+ real browsers and operating systems for both web and mobile applications.

Test now for Free
LambdaTestX

We use cookies to give you the best experience. Cookies help to provide a more personalized experience and relevant advertising for you, and web analytics for us. Learn More in our Cookies policy, Privacy & Terms of service

Allow Cookie
Sarah

I hope you find the best code examples for your project.

If you want to accelerate automated browser testing, try LambdaTest. Your first 100 automation testing minutes are FREE.

Sarah Elson (Product & Growth Lead)