Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Allzweckmesser
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
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
Messerschleifer
Allzweckmesser
Commits
5ba4bba0
Commit
5ba4bba0
authored
6 years ago
by
Simon Will
Browse files
Options
Downloads
Patches
Plain Diff
Remove superfluous parentheses after fixture call
parent
97941839
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
tests/test_model.py
+1
-1
1 addition, 1 deletion
tests/test_model.py
tests/test_scanner.py
+2
-2
2 additions, 2 deletions
tests/test_scanner.py
tests/test_wordlist.py
+3
-3
3 additions, 3 deletions
tests/test_wordlist.py
with
6 additions
and
6 deletions
tests/test_model.py
+
1
−
1
View file @
5ba4bba0
...
@@ -12,7 +12,7 @@ Position = azm.model.Position
...
@@ -12,7 +12,7 @@ Position = azm.model.Position
TEST_DIR
=
os
.
path
.
dirname
(
__file__
)
TEST_DIR
=
os
.
path
.
dirname
(
__file__
)
@pytest.fixture
()
@pytest.fixture
def
verse_models
():
def
verse_models
():
verse_filepath
=
os
.
path
.
join
(
TEST_DIR
,
'
verses.json
'
)
verse_filepath
=
os
.
path
.
join
(
TEST_DIR
,
'
verses.json
'
)
verse_models
=
azm
.
model
.
from_json
(
verse_filepath
)
verse_models
=
azm
.
model
.
from_json
(
verse_filepath
)
...
...
This diff is collapsed.
Click to expand it.
tests/test_scanner.py
+
2
−
2
View file @
5ba4bba0
...
@@ -13,13 +13,13 @@ SESSION_FACTORY = sessionmaker(bind=ENGINE)
...
@@ -13,13 +13,13 @@ SESSION_FACTORY = sessionmaker(bind=ENGINE)
azm
.
db
.
BASE
.
metadata
.
create_all
(
ENGINE
)
azm
.
db
.
BASE
.
metadata
.
create_all
(
ENGINE
)
@pytest.fixture
()
@pytest.fixture
def
word_list
():
def
word_list
():
word_list
=
azm
.
wordlist
.
WordList
(
session_factory
=
SESSION_FACTORY
)
word_list
=
azm
.
wordlist
.
WordList
(
session_factory
=
SESSION_FACTORY
)
return
word_list
return
word_list
@pytest.fixture
()
@pytest.fixture
def
tokenized_verses
():
def
tokenized_verses
():
verses
=
[
verses
=
[
'
nunc dum tibi lubet licetque pota perde rem
'
,
'
nunc dum tibi lubet licetque pota perde rem
'
,
...
...
This diff is collapsed.
Click to expand it.
tests/test_wordlist.py
+
3
−
3
View file @
5ba4bba0
...
@@ -19,20 +19,20 @@ SESSION_FACTORY = sessionmaker(bind=ENGINE)
...
@@ -19,20 +19,20 @@ SESSION_FACTORY = sessionmaker(bind=ENGINE)
azm
.
db
.
BASE
.
metadata
.
create_all
(
ENGINE
)
azm
.
db
.
BASE
.
metadata
.
create_all
(
ENGINE
)
@pytest.fixture
()
@pytest.fixture
def
word_list
():
def
word_list
():
word_list
=
azm
.
wordlist
.
WordList
(
session_factory
=
SESSION_FACTORY
)
word_list
=
azm
.
wordlist
.
WordList
(
session_factory
=
SESSION_FACTORY
)
return
word_list
return
word_list
@pytest.fixture
()
@pytest.fixture
def
populated_word_list
(
word_list
):
def
populated_word_list
(
word_list
):
word_list
.
populate_database
(
MACRONS_FILE
)
word_list
.
populate_database
(
MACRONS_FILE
)
yield
word_list
yield
word_list
word_list
.
depopulate_database
()
word_list
.
depopulate_database
()
@pytest.fixture
()
@pytest.fixture
def
loaded_word_list
(
populated_word_list
):
def
loaded_word_list
(
populated_word_list
):
populated_word_list
.
load_all_from_db
()
populated_word_list
.
load_all_from_db
()
populated_word_list
.
unknown_forms
.
add
(
NONEXISTENT_WORD
)
populated_word_list
.
unknown_forms
.
add
(
NONEXISTENT_WORD
)
...
...
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