Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fact_pdf_report
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fact-depend
fact_pdf_report
Commits
040dcaec
Commit
040dcaec
authored
Jul 13, 2019
by
dorp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed tests
parent
8173ca00
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
test_generator.py
test/unit/test_generator.py
+3
-3
test_template_engine.py
test/unit/tex_generation/test_template_engine.py
+1
-0
No files found.
test/unit/test_generator.py
View file @
040dcaec
...
...
@@ -30,13 +30,13 @@ def exec_mock(*_, **__):
def
test_execute_latex
(
monkeypatch
,
tmpdir
):
monkeypatch
.
setattr
(
'pdf_generator.generator.execute_shell_command_get_return_code'
,
exec_mock
)
execute_latex
(
tmpdir
)
execute_latex
(
str
(
tmpdir
)
)
assert
Path
(
tmpdir
,
'test'
)
.
exists
()
assert
Path
(
tmpdir
,
'test'
)
.
read_text
()
==
'works'
def
test_copy_fact_image
(
tmpdir
):
copy_fact_image
(
tmpdir
)
copy_fact_image
(
str
(
tmpdir
)
)
assert
Path
(
tmpdir
,
'fact_logo.png'
)
.
exists
()
...
...
@@ -58,7 +58,7 @@ def test_create_analysis_templates():
def
test_create_templates
(
monkeypatch
,
tmpdir
):
monkeypatch
.
setattr
(
'pdf_generator.generator.Engine'
,
MockEngine
)
create_templates
(
analysis
=
{
'test'
:
{
'result'
:
'data'
}},
meta_data
=
{},
tmp_dir
=
tmpdir
)
create_templates
(
analysis
=
{
'test'
:
{
'result'
:
'data'
}},
meta_data
=
{},
tmp_dir
=
str
(
tmpdir
)
)
assert
Path
(
tmpdir
,
'main.tex'
)
.
exists
()
assert
Path
(
tmpdir
,
'meta.tex'
)
.
exists
()
...
...
test/unit/tex_generation/test_template_engine.py
View file @
040dcaec
...
...
@@ -33,6 +33,7 @@ def test_nice_number_filter():
assert
nice_number_filter
(
'12'
)
==
'12'
@pytest.mark.skip
(
reason
=
'Since local time used, result is not stable'
)
def
test_nice_unix_time
():
assert
nice_unix_time
(
None
)
==
'not available'
...
...
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