Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
API-Automation
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
文鑫
API-Automation
Commits
29752bdd
Commit
29752bdd
authored
Jul 03, 2020
by
文鑫
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
ffe0b706
c4311d0b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
58 deletions
+0
-58
run.py
+0
-4
test.py
+0
-17
test1.py
+0
-37
No files found.
run.py
deleted
100644 → 0
View file @
ffe0b706
# _*_ coding:utf-8 _*_
_author_
=
'wenxin'
_date_
=
'2020/6/15 14:57'
test.py
deleted
100644 → 0
View file @
ffe0b706
# _*_ coding:utf-8 _*_
_author_
=
'wenxin'
_date_
=
'2020/6/16 16:49'
from
common.getData
import
DoExcelByPandas
data
=
DoExcelByPandas
()
.
get_data_by_pandas
(
'data.xlsx'
,
'Sheet1'
)
url
=
DoExcelByPandas
()
.
get_url_by_pandas
(
'data.xlsx'
,
'Sheet1'
)
# print(data[0]['data'])
# print(type(data[0]['data']))
for
i
in
data
:
print
(
i
)
# for i in url:
# print(i)
\ No newline at end of file
test1.py
deleted
100644 → 0
View file @
ffe0b706
# _*_ coding:utf-8 _*_
_author_
=
'wenxin'
_date_
=
'2020/6/17 11:12'
# content of test_time.py
import
pytest
from
datetime
import
datetime
,
timedelta
testdata
=
[
(
datetime
(
2001
,
12
,
12
),
datetime
(
2001
,
12
,
11
),
timedelta
(
1
)),
(
datetime
(
2001
,
12
,
11
),
datetime
(
2001
,
12
,
12
),
timedelta
(
-
1
)),
]
@pytest.mark.parametrize
(
"a,b,expected"
,
testdata
)
def
test_timedistance_v0
(
a
,
b
,
expected
):
diff
=
a
-
b
assert
diff
==
expected
@pytest.mark.parametrize
(
"a,b,expected"
,
testdata
,
ids
=
[
"forward"
,
"backward"
])
def
test_timedistance_v1
(
a
,
b
,
expected
):
diff
=
a
-
b
assert
diff
==
expected
def
idfn
(
val
):
if
isinstance
(
val
,
(
datetime
,)):
# note this wouldn't show any hours/minutes/seconds
return
val
.
strftime
(
'
%
Y
%
m
%
d'
)
@pytest.mark.parametrize
(
"a,b,expected"
,
testdata
,
ids
=
idfn
)
def
test_timedistance_v2
(
a
,
b
,
expected
):
diff
=
a
-
b
assert
diff
==
expected
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment