FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
allure-python/allure-python-commons-test/src/content.py at master · nilf/allure-python · GitHub
nilf
/
allure-python
Public
forked from
allure-framework/allure-python
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
allure-python
/
allure-python-commons-test
/
src
/
content.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
24 lines (17 loc) · 641 Bytes
Breadcrumbs
allure-python
/
allure-python-commons-test
/
src
/
content.py
Copy path
File metadata and controls
24 lines (17 loc) · 641 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import
csv
import
io
from
hamcrest
.
core
.
base_matcher
import
BaseMatcher
class
CsvEquivalent
(
BaseMatcher
):
def
__init__
(
self
,
rows
,
**
csv_kwargs
):
self
.
__rows
=
rows
self
.
__csv_kwargs
=
csv_kwargs
def
_matches
(
self
,
item
):
with
io
.
StringIO
(
item
,
newline
=
""
)
as
stream
:
reader
=
csv
.
reader
(
stream
,
**
self
.
__csv_kwargs
)
return
list
(
reader
)
==
self
.
__rows
def
describe_to
(
self
,
description
):
description
.
append_text
(
f"csv document equivalent to
{
self
.
__rows
!r
}
"
)
def
csv_equivalent
(
rows
,
**
csv_kwargs
):
return
CsvEquivalent
(
rows
,
**
csv_kwargs
)
Back
|
FazBrowse Home
|
New Git URL