Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
agkyra
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
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
itminedu
agkyra
Commits
d6a08445
Commit
d6a08445
authored
9 years ago
by
Giorgos Korfiatis
Browse files
Options
Downloads
Patches
Plain Diff
Merge tests into main script
parent
d7266c70
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
agkyra/scripts/agkyra
+8
-1
8 additions, 1 deletion
agkyra/scripts/agkyra
agkyra/scripts/test.py
+20
-1
20 additions, 1 deletion
agkyra/scripts/test.py
with
28 additions
and
2 deletions
agkyra/scripts/agkyra
+
8
−
1
View file @
d6a08445
...
@@ -69,17 +69,24 @@ def run_cli(debug, extras=None):
...
@@ -69,17 +69,24 @@ def run_cli(debug, extras=None):
agkcli
.
onecmd
(
'
'
.
join
(
extras
or
[
'
help
'
,
]))
agkcli
.
onecmd
(
'
'
.
join
(
extras
or
[
'
help
'
,
]))
def
run_test
(
debug
,
extras
=
None
):
LOGGER
.
removeHandler
(
HANDLER
)
from
agkyra.scripts
import
test
test
.
main
(
debug
)
DISPATCH
=
{
DISPATCH
=
{
'
server
'
:
run_server
,
'
server
'
:
run_server
,
'
gui
'
:
run_gui
,
'
gui
'
:
run_gui
,
'
cli
'
:
run_cli
,
'
cli
'
:
run_cli
,
'
test
'
:
run_test
,
}
}
parser
=
argparse
.
ArgumentParser
(
description
=
'
Agkyra syncer launcher
'
)
parser
=
argparse
.
ArgumentParser
(
description
=
'
Agkyra syncer launcher
'
)
parser
.
add_argument
(
'
--debug
'
,
'
-d
'
,
action
=
'
store_true
'
,
parser
.
add_argument
(
'
--debug
'
,
'
-d
'
,
action
=
'
store_true
'
,
help
=
"
set logging level to
'
debug
'"
)
help
=
"
set logging level to
'
debug
'"
)
parser
.
add_argument
(
'
component
'
,
nargs
=
"
?
"
,
default
=
"
gui
"
,
parser
.
add_argument
(
'
component
'
,
nargs
=
"
?
"
,
default
=
"
gui
"
,
help
=
"
run
'
server
'
,
'
cli
'
, or
'
gui
'
(default)
"
)
help
=
"
run
'
test
'
,
'
server
'
,
'
cli
'
, or
'
gui
'
(default)
"
)
parser
.
add_argument
(
'
command
'
,
nargs
=
"
*
"
,
help
=
"
command in case of cli
"
)
parser
.
add_argument
(
'
command
'
,
nargs
=
"
*
"
,
help
=
"
command in case of cli
"
)
def
main
():
def
main
():
...
...
This diff is collapsed.
Click to expand it.
test.py
→
agkyra/scripts/
test.py
+
20
−
1
View file @
d6a08445
...
@@ -31,6 +31,7 @@ import unittest
...
@@ -31,6 +31,7 @@ import unittest
import
mock
import
mock
import
sqlite3
import
sqlite3
import
tempfile
import
tempfile
import
argparse
from
functools
import
wraps
from
functools
import
wraps
from
agkyra.config
import
AgkyraConfig
,
CONFIG_PATH
from
agkyra.config
import
AgkyraConfig
,
CONFIG_PATH
...
@@ -813,5 +814,23 @@ class AgkyraTest(unittest.TestCase):
...
@@ -813,5 +814,23 @@ class AgkyraTest(unittest.TestCase):
handle
.
check_staged
(
live_info
)
handle
.
check_staged
(
live_info
)
def
set_debug
(
debug
):
level
=
logging
.
DEBUG
if
debug
else
logging
.
INFO
logger
.
setLevel
(
level
)
def
main
(
debug
):
set_debug
(
debug
)
runner
=
unittest
.
TextTestRunner
()
runner
.
run
(
unittest
.
makeSuite
(
AgkyraTest
))
parser
=
argparse
.
ArgumentParser
(
description
=
'
Agkyra syncer launcher
'
)
parser
.
add_argument
(
'
--debug
'
,
'
-d
'
,
action
=
'
store_true
'
,
help
=
"
set logging level to
'
debug
'"
)
if
__name__
==
'
__main__
'
:
if
__name__
==
'
__main__
'
:
unittest
.
main
()
args
=
parser
.
parse_args
()
debug
=
args
.
debug
main
(
debug
)
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