Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
diffoscope
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Reproducible Builds
diffoscope
Commits
68638cd3
Commit
68638cd3
authored
3 years ago
by
Chris Lamb
Browse files
Options
Downloads
Patches
Plain Diff
Update R test fixture for R 4.2.x series.
parent
f5a70b4b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#361960
failed
3 years ago
Stage: test
Stage: deploy
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tests/comparators/test_rdata.py
+17
-2
17 additions, 2 deletions
tests/comparators/test_rdata.py
tests/data/rdb_expected_diff
+1
-1
1 addition, 1 deletion
tests/data/rdb_expected_diff
with
18 additions
and
3 deletions
tests/comparators/test_rdata.py
+
17
−
2
View file @
68638cd3
...
...
@@ -2,7 +2,7 @@
# diffoscope: in-depth comparison of files, archives, and directories
#
# Copyright © 2017 Ximin Luo <infinity0@debian.org>
# Copyright © 2017, 2020-202
1
Chris Lamb <lamby@debian.org>
# Copyright © 2017, 2020-202
2
Chris Lamb <lamby@debian.org>
#
# diffoscope is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
...
...
@@ -17,13 +17,15 @@
# You should have received a copy of the GNU General Public License
# along with diffoscope. If not, see <https://www.gnu.org/licenses/>.
import
re
import
pytest
import
subprocess
from
diffoscope.comparators.gzip
import
GzipFile
from
diffoscope.comparators.rdata
import
RdbFile
from
..utils.data
import
load_fixture
,
get_data
,
assert_diff
from
..utils.tools
import
skip_unless_tools_exist
from
..utils.tools
import
skip_unless_tools_exist
,
skip_unless_tool_is_at_least
rdb1
=
load_fixture
(
"
test1.rdb
"
)
...
...
@@ -32,6 +34,18 @@ rdx1 = load_fixture("test1.rdx")
rdx2
=
load_fixture
(
"
test2.rdx
"
)
def
rscript_version
():
val
=
subprocess
.
check_output
(
(
"
Rscript
"
,
"
--version
"
),
stderr
=
subprocess
.
STDOUT
)
m
=
re
.
search
(
r
"
version (?P<version>[^\(]+)\s
"
,
val
.
decode
(
"
utf-8
"
))
if
not
m
:
return
"
~0unknown
"
return
m
.
group
(
"
version
"
)
def
test_identification
(
rdb1
,
rdx1
):
assert
isinstance
(
rdb1
,
RdbFile
)
assert
isinstance
(
rdx1
,
GzipFile
)
...
...
@@ -58,6 +72,7 @@ def test_num_items_rdb(differences_rdb):
@skip_unless_tools_exist
(
"
Rscript
"
)
@skip_unless_tool_is_at_least
(
"
Rscript
"
,
rscript_version
,
"
4.2.0
"
)
def
test_item_rdb
(
differences_rdb
):
assert
differences_rdb
[
0
].
source1
.
startswith
(
"
Rscript
"
)
assert_diff
(
differences_rdb
[
0
],
"
rdb_expected_diff
"
)
...
...
This diff is collapsed.
Click to expand it.
tests/data/rdb_expected_diff
+
1
−
1
View file @
68638cd3
...
...
@@ -137,7 +137,7 @@
.__NAMESPACE__. (environment) =
{
"S3methods" = "structure(character(0),
.D
im = c(0L, 4L))"
"S3methods" = "structure(character(0),
d
im = c(0L, 4L))"
"dynlibs" = "NULL"
"exports" = "<environment>"
- "imports" = "list(base = TRUE, utils = c(aspell_package_Rd_files = "aspell_package_Rd_files", "
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment