Skip to content

Commit 36da55c

Browse files
sarahmonodGus Monod
authored and
Gus Monod
committed
Mark failing tests as xfail
The `cdb2_open` function seems to completely ignore its third argument (`type`) and works regardless of whether it is a valid `utf-8` string or not. This seems to be a bug in `bloomberg/comdb2`. Signed-off-by: Gus Monod <[email protected]>
1 parent 843b8e9 commit 36da55c

File tree

4 files changed

+6
-1
lines changed

4 files changed

+6
-1
lines changed

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,6 @@ requires = [
77
]
88

99
build-backend = 'setuptools.build_meta'
10+
11+
[tool.pytest.ini_options]
12+
xfail_strict=true

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def make_static_extension(name, **kwargs):
4949
author_email='[email protected]',
5050
packages=['comdb2'],
5151
install_requires=["six", "pytz"],
52-
extras_require={"tests": ["python-dateutil>=2.6.0", "pytest"]},
52+
extras_require={"tests": ["python-dateutil>=2.6.0", "pytest", "mock; python_version < '3.3'"]},
5353
ext_modules=[ccdb2],
5454
package_data={"comdb2": ["py.typed", "*.pyi"]},
5555
)

tests/test_cdb2.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ def test_get_effects():
219219
assert hndl.get_effects().num_deleted == 1
220220

221221

222+
@pytest.mark.xfail(reason="cdb2_open ignores tier")
222223
def test_nonascii_error_messages():
223224
with pytest.raises(cdb2.Error) as exc_info:
224225
cdb2.Handle('mattdb', b'\xc3')

tests/test_dbapi2.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ def delete_all_rows():
7777
conn.close()
7878

7979

80+
@pytest.mark.xfail(reason="cdb2_open ignores tier")
8081
def test_invalid_cluster():
8182
with pytest.raises(OperationalError):
8283
connect('mattdb', 'foo')

0 commit comments

Comments
 (0)