Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
zodbtools
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
zodbtools
Commits
2236aaaf
Commit
2236aaaf
authored
Apr 29, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tidrange: test: Fix for py3
ashex gives bytes, whereas reference_tid was str.
parent
7851a964
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
zodbtools/test/test_tidrange.py
zodbtools/test/test_tidrange.py
+5
-4
No files found.
zodbtools/test/test_tidrange.py
View file @
2236aaaf
# -*- coding: utf-8 -*-
# Copyright (C) 2019 Nexedi SA and Contributors.
# Copyright (C) 2019
-2020
Nexedi SA and Contributors.
#
# This program is free software: you can Use, Study, Modify and Redistribute
# it under the terms of the GNU General Public License version 3, or (at your
...
...
@@ -27,6 +27,7 @@ from freezegun import freeze_time
import
tzlocal
from
zodbtools.util
import
TidRangeInvalid
,
TidInvalid
,
ashex
,
parse_tid
,
parse_tidrange
from
golang
import
b
@
pytest
.
fixture
...
...
@@ -94,7 +95,7 @@ def test_parse_tid():
assert
exc
.
value
.
args
==
(
''
,
)
test_parameters
=
[]
test_parameters
=
[]
# of (reference_time, reference_tid, input_time)
with
open
(
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
"testdata"
,
...
...
@@ -109,7 +110,7 @@ with open(
test_parameters
)
def
test_parse_tid_time_format
(
fake_time
,
reference_time
,
reference_tid
,
input_time
):
assert
reference_tid
==
ashex
(
parse_tid
(
input_time
))
assert
b
(
reference_tid
)
==
ashex
(
parse_tid
(
input_time
))
# check that the reference_tid matches the reference time, mainly
# to check that input is defined correctly.
assert
reference_tid
==
ashex
(
parse_tid
(
reference_time
))
assert
b
(
reference_tid
)
==
ashex
(
parse_tid
(
reference_time
))
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