Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
rpg
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
Nicolas MAILLET
rpg
Commits
b1571050
Commit
b1571050
authored
7 years ago
by
Nicolas MAILLET
Browse files
Options
Downloads
Patches
Plain Diff
Correct typo
parent
ac63bbe2
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
rpg/enzyme.py
+2
-1
2 additions, 1 deletion
rpg/enzyme.py
tests/test_enzyme.py
+1
-1
1 addition, 1 deletion
tests/test_enzyme.py
with
3 additions
and
2 deletions
rpg/enzyme.py
+
2
−
1
View file @
b1571050
...
...
@@ -78,9 +78,10 @@ class Enzyme:
:param enz_file: location of user file (default: ~/rpg_user.py)
:type enz_file: str
"""
print
(
self
)
if
self
.
rules
!=
[]:
# Comment and first line of the Enzyme
ret
=
"
\n\n\n
# User
defined enzyme
"
+
self
.
name
+
"
\n
ENZ = []
\n\n
"
ret
=
"
\n\n\n
# User
-
defined enzyme
"
+
self
.
name
+
"
\n
ENZ = []
\n\n
"
# Write all the main rules and their su-rules
for
i
in
self
.
rules
:
ret
+=
i
.
format_rule
()
...
...
This diff is collapsed.
Click to expand it.
tests/test_enzyme.py
+
1
−
1
View file @
b1571050
...
...
@@ -49,7 +49,7 @@ def test_enzyme(tmpdir):
all_rules
=
rule
.
create_rules
(
dict_rule
)
new_enz
=
enzyme
.
Enzyme
(
-
1
,
"
fake_enzyme
"
,
all_rules
)
new_enz
.
write_enzyme_in_user_file
(
str
(
output_file
))
assert
output_file
.
read
()
==
'
\n\n\n
# User
defined enzyme fake_enzyme
\n
ENZ = []
\n
'
\
assert
output_file
.
read
()
==
'
\n\n\n
# User
-
defined enzyme fake_enzyme
\n
ENZ = []
\n
'
\
'
\n
E_1 = rule.Rule(0,
"
E
"
, False, 1) # Never cut
'
\
'
after E, except...
\n
D_E_1M1 = rule.Rule(-1,
"
D
"
,
'
\
'
True, -1) # Always cut after E, preceded by D,
'
\
...
...
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