Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
gargantext
Project
Project
Details
Activity
Releases
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
humanities
gargantext
Commits
e41a7d27
Commit
e41a7d27
authored
Aug 18, 2016
by
Romain Loth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
toolchain tests: try new method of getting expected_ndocs
parent
5016d95e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
tests_090_toolchain.py
unittests/tests_090_toolchain.py
+2
-2
No files found.
unittests/tests_090_toolchain.py
View file @
e41a7d27
...
@@ -117,7 +117,7 @@ class ToolChainRecipes(TestCase):
...
@@ -117,7 +117,7 @@ class ToolChainRecipes(TestCase):
for
i
,
sample_file
in
enumerate
(
self
.
sample_files
[
source_name
]):
for
i
,
sample_file
in
enumerate
(
self
.
sample_files
[
source_name
]):
print
(
"... sample_file:"
,
sample_file
)
print
(
"... sample_file:"
,
sample_file
)
#
expected_ndocs = expected_results[i]
expected_ndocs
=
expected_results
[
i
]
name
=
"test_"
+
source_name
+
str
(
i
)
name
=
"test_"
+
source_name
+
str
(
i
)
self
.
log
.
debug
(
"
\t
- Checking creation of corpus
%
s"
%
name
)
self
.
log
.
debug
(
"
\t
- Checking creation of corpus
%
s"
%
name
)
self
.
corpus
=
self
.
_create_corpus
(
name
,
source_type
,
sample_file
)
self
.
corpus
=
self
.
_create_corpus
(
name
,
source_type
,
sample_file
)
...
@@ -130,7 +130,7 @@ class ToolChainRecipes(TestCase):
...
@@ -130,7 +130,7 @@ class ToolChainRecipes(TestCase):
parse
(
self
.
corpus
)
parse
(
self
.
corpus
)
real_ndocs
=
self
.
__count_node_children__
(
self
.
corpus
,
"DOCUMENT"
)
real_ndocs
=
self
.
__count_node_children__
(
self
.
corpus
,
"DOCUMENT"
)
print
(
'==>
\t
'
+
str
(
source_type
)
+
'
\t
'
+
str
(
i
)
+
'
\t
'
+
sample_file
+
'
\t
'
+
str
(
real_ndocs
))
print
(
'==>
\t
'
+
str
(
source_type
)
+
'
\t
'
+
str
(
i
)
+
'
\t
'
+
sample_file
+
'
\t
'
+
str
(
real_ndocs
))
self
.
assertEqual
(
real_ndocs
,
expected_n
umber_of_
docs
)
self
.
assertEqual
(
real_ndocs
,
expected_ndocs
)
status
=
self
.
corpus
.
status
()
status
=
self
.
corpus
.
status
()
self
.
log
.
debug
(
"
\t
- Extracting ngrams"
)
self
.
log
.
debug
(
"
\t
- Extracting ngrams"
)
extract_ngrams
(
self
.
corpus
)
extract_ngrams
(
self
.
corpus
)
...
...
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