firebird-qa 0.19.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,136 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ pip-wheel-metadata/
24
+ share/python-wheels/
25
+ *.egg-info/
26
+ .installed.cfg
27
+ *.egg
28
+ MANIFEST
29
+
30
+ # PyInstaller
31
+ # Usually these files are written by a python script from a template
32
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
33
+ *.manifest
34
+ *.spec
35
+
36
+ # Installer logs
37
+ pip-log.txt
38
+ pip-delete-this-directory.txt
39
+
40
+ # Unit test / coverage reports
41
+ htmlcov/
42
+ .tox/
43
+ .nox/
44
+ .coverage
45
+ .coverage.*
46
+ .cache
47
+ nosetests.xml
48
+ coverage.xml
49
+ *.cover
50
+ *.py,cover
51
+ .hypothesis/
52
+ .pytest_cache/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Django stuff:
59
+ *.log
60
+ local_settings.py
61
+ db.sqlite3
62
+ db.sqlite3-journal
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Sphinx documentation
72
+ docs/_build/
73
+
74
+ # PyBuilder
75
+ target/
76
+
77
+ # Jupyter Notebook
78
+ .ipynb_checkpoints
79
+
80
+ # IPython
81
+ profile_default/
82
+ ipython_config.py
83
+
84
+ # pyenv
85
+ .python-version
86
+
87
+ # pipenv
88
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
89
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
90
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
91
+ # install all needed dependencies.
92
+ #Pipfile.lock
93
+
94
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow
95
+ __pypackages__/
96
+
97
+ # Celery stuff
98
+ celerybeat-schedule
99
+ celerybeat.pid
100
+
101
+ # SageMath parsed files
102
+ *.sage.py
103
+
104
+ # Environments
105
+ .env
106
+ .venv
107
+ env/
108
+ venv/
109
+ ENV/
110
+ env.bak/
111
+ venv.bak/
112
+
113
+ # Spyder project settings
114
+ .spyderproject
115
+ .spyproject
116
+
117
+ # Rope project settings
118
+ .ropeproject
119
+
120
+ # mkdocs documentation
121
+ /site
122
+
123
+ # mypy
124
+ .mypy_cache/
125
+ .dmypy.json
126
+ dmypy.json
127
+
128
+ # Pyre type checker
129
+ .pyre/
130
+
131
+ # WingIDE
132
+ *.wpr
133
+ *.wpu
134
+
135
+ # Sphinx build
136
+ docs/_build
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2020 FirebirdSQL
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,214 @@
1
+ Metadata-Version: 2.1
2
+ Name: firebird-qa
3
+ Version: 0.19.0
4
+ Summary: pytest plugin for Firebird QA
5
+ Project-URL: Home, https://github.com/FirebirdSQL/firebird-qa
6
+ Project-URL: Documentation, https://firebird-qa.rtfd.io
7
+ Project-URL: Issues, https://github.com/FirebirdSQL/firebird-qa/issues
8
+ Project-URL: Funding, https://github.com/sponsors/pcisar
9
+ Project-URL: Source, https://github.com/FirebirdSQL/firebird-qa
10
+ Author-email: Pavel Cisar <pcisar@users.sourceforge.net>
11
+ License: MIT License
12
+
13
+ Copyright (c) 2020 FirebirdSQL
14
+
15
+ Permission is hereby granted, free of charge, to any person obtaining a copy
16
+ of this software and associated documentation files (the "Software"), to deal
17
+ in the Software without restriction, including without limitation the rights
18
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
19
+ copies of the Software, and to permit persons to whom the Software is
20
+ furnished to do so, subject to the following conditions:
21
+
22
+ The above copyright notice and this permission notice shall be included in all
23
+ copies or substantial portions of the Software.
24
+
25
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
26
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
27
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
28
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
29
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
30
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
31
+ SOFTWARE.
32
+ License-File: LICENSE
33
+ Keywords: Collections,Configuration,Firebird,Hooks,Logging,Protobuf,Signals,Trace
34
+ Classifier: Development Status :: 5 - Production/Stable
35
+ Classifier: Framework :: Pytest
36
+ Classifier: Intended Audience :: Developers
37
+ Classifier: License :: OSI Approved :: MIT License
38
+ Classifier: Operating System :: MacOS
39
+ Classifier: Operating System :: Microsoft :: Windows
40
+ Classifier: Operating System :: POSIX :: Linux
41
+ Classifier: Programming Language :: Python :: 3 :: Only
42
+ Classifier: Programming Language :: Python :: 3.8
43
+ Classifier: Programming Language :: Python :: 3.9
44
+ Classifier: Programming Language :: Python :: 3.10
45
+ Classifier: Programming Language :: Python :: 3.11
46
+ Classifier: Programming Language :: Python :: 3.12
47
+ Classifier: Topic :: Database :: Database Engines/Servers
48
+ Classifier: Topic :: Software Development :: Testing
49
+ Requires-Python: <4,>=3.8
50
+ Requires-Dist: firebird-base>=1.7.1
51
+ Requires-Dist: firebird-driver>=1.10.1
52
+ Requires-Dist: psutil>=5.9.8
53
+ Requires-Dist: pytest>=8.0.0
54
+ Description-Content-Type: text/markdown
55
+
56
+ # pytest plugin for Firebird QA
57
+
58
+ ## Installation
59
+
60
+ If you plan to use this plugin for personal purposes (not related to Firebird project QA),
61
+ we recommend to use `pipx` to install `pytest` together with `firebird-qa` plugin:
62
+
63
+ ```
64
+ pipx install pytest
65
+ pipx inject pytest firebird-qa
66
+ ```
67
+
68
+ ## Configuration
69
+
70
+ ### Firebird-driver configuration
71
+
72
+ The QA plugin uses firebird-driver to access the Firebird servers, and uses driver configuration
73
+ object to set up various driver and server/database connection parameters. The configuration object
74
+ is initialized from `firebird-driver.conf` file, and plugin specifically utilizes server sections
75
+ in this file. When pytest is invoked, you must specify tested server with `–server <name>` option,
76
+ where `<name>` is name of server configuration section in `firebird-driver.conf` file.
77
+
78
+ This file is stored in firebird-qa repository, and defines default configuration suitable to most QA setups.
79
+
80
+ Note:
81
+
82
+ The `firebird-driver.conf` file should be located in QA root directory. In default setup, the QA plugin
83
+ is used to test local Firebird installation with default user name and password (SYSDBA/masterkey)
84
+ via local server (configuration section).
85
+
86
+ Important:
87
+
88
+ The firebird-driver currently does not support specification of client library in server sections.
89
+ However, the QA plugin works around that limitation. If server section for tested server contains
90
+ `fb_client_library` option specification, it’s copied to global setting.
91
+
92
+ See configuration chapter in [driver documentation](https://firebird-driver.readthedocs.io) for details.
93
+
94
+ ### Pytest configuration
95
+
96
+ While it’s not required, it’s recommended to create pytest configuration file in QA root directory.
97
+ You may use this file to simplify your use of pytest with addopts option, or adjust pytest behaviour.
98
+
99
+ Suggested options for `pytest.ini`:
100
+ ```
101
+ console_output_style = count
102
+ testpaths = tests
103
+ addopts = --server local --install-terminal
104
+ ```
105
+
106
+ ## Running test for Firebird
107
+
108
+ To run all tests in suite against local Firebird server, invoke:
109
+ ```
110
+ pytest --server local ./tests
111
+ ```
112
+
113
+ Tip: If you created `pytest.ini` with recommended values, you can just invoke pytest without additional parameters.
114
+
115
+ ### pytest report header
116
+
117
+ When pytest is invoked, a report header is printed on terminal before individual tests are executed.
118
+ The QA plugin extend this header with next information:
119
+
120
+ - Python encodings
121
+
122
+ - system
123
+ - locale
124
+ - filesystem
125
+
126
+ - Information about tested Firebird server
127
+
128
+ - conf. section name
129
+ - version
130
+ - mode
131
+ - architecture
132
+ - home directory
133
+ - tools directory
134
+ - used client library
135
+
136
+ ### pytest switches installed by QA plugin
137
+
138
+ The QA plugin installs several pytest command-line switches. When you run pytest ``--help``,
139
+ they are listed in Firebird QA section:
140
+ ```
141
+ Firebird QA:
142
+ --server=SERVER Server configuration name
143
+ --bin-dir=PATH Path to directory with Firebird utilities
144
+ --protocol={xnet,inet,inet4,wnet}
145
+ Network protocol used for database attachments
146
+ --runslow Run slow tests
147
+ --save-output Save test std[out|err] output to files
148
+ --skip-deselected={platform,version,any}
149
+ SKIP tests instead deselection
150
+ --extend-xml Extend XML JUnit report with additional information
151
+ --install-terminal Use our own terminal reporter
152
+ ```
153
+
154
+ **server:**
155
+
156
+ REQUIRED option. Section name in firebird-driver.conf with connection parameters for tested server.
157
+
158
+ **bin-dir:**
159
+
160
+ Normally, the QA plugin detects and properly sets the directory where Firebird tools are installed.
161
+ However, you can set this directory explicitly using the --bin-dir switch.
162
+
163
+ **protocol:**
164
+
165
+ Override for network protocol specified in firebird-driver.conf file (or default).
166
+
167
+ **runslow:**
168
+
169
+ Tests that run for longer than 10 minutes on equipment used for regular Firebird QA should be
170
+ marked as slow. They are not executed, unless this switch is specified.
171
+
172
+ **save-output:**
173
+
174
+ _Experimental switch_
175
+
176
+ When this switch is specified, stdout/stderr output of external Firebird tool executed by
177
+ test is stored in `/out` subdirectory. Intended for test debugging.
178
+
179
+ **skip-deselected:**
180
+
181
+ Tests that are not applicable to tested server (because they are for specific platform or
182
+ Firebird versions) are deselected during pytest collection phase. It means that they are not
183
+ shown in test session report. This switch changes the routine, so tests are marked to skip
184
+ (with message explaining why) instead deselection, so they show up is session report.
185
+
186
+ **extend-xml:**
187
+
188
+ When this switch is used together with `--junitxml` switch, the produced JUnitXML file will
189
+ contain additional metadata for testsuite and testcase elements recorded as property sub-elements.
190
+
191
+ **Important:**
192
+
193
+ Please note that using this feature will break schema verifications for the latest JUnitXML schema.
194
+ This might be a problem when used with some CI servers.
195
+
196
+ **install-terminal:**
197
+
198
+ This option changes default pytest terminal reporter that displays pytest NODE IDs, to custom
199
+ reporter that displays Firebord QA test IDs.
200
+
201
+ pytest node IDs are of the form `module.py::class::method` or `module.py::function`.
202
+
203
+ Firebord QA test IDs are defined in our test metadata.
204
+
205
+ **Important:**
206
+
207
+ Right now, the custom terminal is opt-in feature. This will be changed in some future release
208
+ to opt-out using new switch.
209
+
210
+
211
+ ### Test for use with this plugin
212
+
213
+ Please read the [plugin documentation](https://firebird-qa.rtfd.io) for instructions how
214
+ to create tests that use special support provided by this plugin.
@@ -0,0 +1,159 @@
1
+ # pytest plugin for Firebird QA
2
+
3
+ ## Installation
4
+
5
+ If you plan to use this plugin for personal purposes (not related to Firebird project QA),
6
+ we recommend to use `pipx` to install `pytest` together with `firebird-qa` plugin:
7
+
8
+ ```
9
+ pipx install pytest
10
+ pipx inject pytest firebird-qa
11
+ ```
12
+
13
+ ## Configuration
14
+
15
+ ### Firebird-driver configuration
16
+
17
+ The QA plugin uses firebird-driver to access the Firebird servers, and uses driver configuration
18
+ object to set up various driver and server/database connection parameters. The configuration object
19
+ is initialized from `firebird-driver.conf` file, and plugin specifically utilizes server sections
20
+ in this file. When pytest is invoked, you must specify tested server with `–server <name>` option,
21
+ where `<name>` is name of server configuration section in `firebird-driver.conf` file.
22
+
23
+ This file is stored in firebird-qa repository, and defines default configuration suitable to most QA setups.
24
+
25
+ Note:
26
+
27
+ The `firebird-driver.conf` file should be located in QA root directory. In default setup, the QA plugin
28
+ is used to test local Firebird installation with default user name and password (SYSDBA/masterkey)
29
+ via local server (configuration section).
30
+
31
+ Important:
32
+
33
+ The firebird-driver currently does not support specification of client library in server sections.
34
+ However, the QA plugin works around that limitation. If server section for tested server contains
35
+ `fb_client_library` option specification, it’s copied to global setting.
36
+
37
+ See configuration chapter in [driver documentation](https://firebird-driver.readthedocs.io) for details.
38
+
39
+ ### Pytest configuration
40
+
41
+ While it’s not required, it’s recommended to create pytest configuration file in QA root directory.
42
+ You may use this file to simplify your use of pytest with addopts option, or adjust pytest behaviour.
43
+
44
+ Suggested options for `pytest.ini`:
45
+ ```
46
+ console_output_style = count
47
+ testpaths = tests
48
+ addopts = --server local --install-terminal
49
+ ```
50
+
51
+ ## Running test for Firebird
52
+
53
+ To run all tests in suite against local Firebird server, invoke:
54
+ ```
55
+ pytest --server local ./tests
56
+ ```
57
+
58
+ Tip: If you created `pytest.ini` with recommended values, you can just invoke pytest without additional parameters.
59
+
60
+ ### pytest report header
61
+
62
+ When pytest is invoked, a report header is printed on terminal before individual tests are executed.
63
+ The QA plugin extend this header with next information:
64
+
65
+ - Python encodings
66
+
67
+ - system
68
+ - locale
69
+ - filesystem
70
+
71
+ - Information about tested Firebird server
72
+
73
+ - conf. section name
74
+ - version
75
+ - mode
76
+ - architecture
77
+ - home directory
78
+ - tools directory
79
+ - used client library
80
+
81
+ ### pytest switches installed by QA plugin
82
+
83
+ The QA plugin installs several pytest command-line switches. When you run pytest ``--help``,
84
+ they are listed in Firebird QA section:
85
+ ```
86
+ Firebird QA:
87
+ --server=SERVER Server configuration name
88
+ --bin-dir=PATH Path to directory with Firebird utilities
89
+ --protocol={xnet,inet,inet4,wnet}
90
+ Network protocol used for database attachments
91
+ --runslow Run slow tests
92
+ --save-output Save test std[out|err] output to files
93
+ --skip-deselected={platform,version,any}
94
+ SKIP tests instead deselection
95
+ --extend-xml Extend XML JUnit report with additional information
96
+ --install-terminal Use our own terminal reporter
97
+ ```
98
+
99
+ **server:**
100
+
101
+ REQUIRED option. Section name in firebird-driver.conf with connection parameters for tested server.
102
+
103
+ **bin-dir:**
104
+
105
+ Normally, the QA plugin detects and properly sets the directory where Firebird tools are installed.
106
+ However, you can set this directory explicitly using the --bin-dir switch.
107
+
108
+ **protocol:**
109
+
110
+ Override for network protocol specified in firebird-driver.conf file (or default).
111
+
112
+ **runslow:**
113
+
114
+ Tests that run for longer than 10 minutes on equipment used for regular Firebird QA should be
115
+ marked as slow. They are not executed, unless this switch is specified.
116
+
117
+ **save-output:**
118
+
119
+ _Experimental switch_
120
+
121
+ When this switch is specified, stdout/stderr output of external Firebird tool executed by
122
+ test is stored in `/out` subdirectory. Intended for test debugging.
123
+
124
+ **skip-deselected:**
125
+
126
+ Tests that are not applicable to tested server (because they are for specific platform or
127
+ Firebird versions) are deselected during pytest collection phase. It means that they are not
128
+ shown in test session report. This switch changes the routine, so tests are marked to skip
129
+ (with message explaining why) instead deselection, so they show up is session report.
130
+
131
+ **extend-xml:**
132
+
133
+ When this switch is used together with `--junitxml` switch, the produced JUnitXML file will
134
+ contain additional metadata for testsuite and testcase elements recorded as property sub-elements.
135
+
136
+ **Important:**
137
+
138
+ Please note that using this feature will break schema verifications for the latest JUnitXML schema.
139
+ This might be a problem when used with some CI servers.
140
+
141
+ **install-terminal:**
142
+
143
+ This option changes default pytest terminal reporter that displays pytest NODE IDs, to custom
144
+ reporter that displays Firebord QA test IDs.
145
+
146
+ pytest node IDs are of the form `module.py::class::method` or `module.py::function`.
147
+
148
+ Firebord QA test IDs are defined in our test metadata.
149
+
150
+ **Important:**
151
+
152
+ Right now, the custom terminal is opt-in feature. This will be changed in some future release
153
+ to opt-out using new switch.
154
+
155
+
156
+ ### Test for use with this plugin
157
+
158
+ Please read the [plugin documentation](https://firebird-qa.rtfd.io) for instructions how
159
+ to create tests that use special support provided by this plugin.