Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
multitouch
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Taddeüs Kroes
multitouch
Commits
bda8ed3f
Commit
bda8ed3f
authored
May 30, 2012
by
Taddeus Kroes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved argument parsing in tests to separate file.
parent
d0c261ed
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
50 deletions
+26
-50
tests/__init__.py
tests/__init__.py
+0
-0
tests/basic.py
tests/basic.py
+1
-25
tests/parse_arguments.py
tests/parse_arguments.py
+24
-0
tests/tap.py
tests/tap.py
+1
-25
No files found.
tests/__init__.py
0 → 100644
View file @
bda8ed3f
tests/basic.py
View file @
bda8ed3f
import
argparse
import
logging
from
src.server
import
GestureServer
from
src.window
import
FullscreenWindow
from
src.trackers.basic
import
BasicTracker
from
src.logger
import
Logger
# Parse arguments
parser
=
argparse
.
ArgumentParser
(
description
=
'Basic test program for usage '
'of multi-touch API.'
)
parser
.
add_argument
(
'--log'
,
metavar
=
'LOG_LEVEL'
,
default
=
'INFO'
,
choices
=
[
'DEBUG'
,
'INFO'
,
'WARNING'
],
help
=
'set log level (defaults to INFO)'
)
parser
.
add_argument
(
'--logfile'
,
metavar
=
'FILENAME'
,
help
=
'filename for the log file (the log is printed to '
'stdout by default)'
)
args
=
parser
.
parse_args
()
# Configure logger
log_config
=
{
'level'
:
getattr
(
logging
,
args
.
log
)}
if
args
.
logfile
:
log_config
[
'filename'
]
=
args
.
logfile
Logger
.
configure
(
**
log_config
)
import
tests.parse_arguments
# Create server
server
=
GestureServer
()
...
...
tests/parse_arguments.py
0 → 100644
View file @
bda8ed3f
import
argparse
import
logging
from
src.logger
import
Logger
# Parse arguments
parser
=
argparse
.
ArgumentParser
(
description
=
'Basic test program for usage '
'of multi-touch API.'
)
parser
.
add_argument
(
'--log'
,
metavar
=
'LOG_LEVEL'
,
default
=
'INFO'
,
choices
=
[
'DEBUG'
,
'INFO'
,
'WARNING'
],
help
=
'set log level (defaults to INFO)'
)
parser
.
add_argument
(
'--logfile'
,
metavar
=
'FILENAME'
,
help
=
'filename for the log file (the log is printed to '
'stdout by default)'
)
args
=
parser
.
parse_args
()
# Configure logger
log_config
=
{
'level'
:
getattr
(
logging
,
args
.
log
)}
if
args
.
logfile
:
log_config
[
'filename'
]
=
args
.
logfile
Logger
.
configure
(
**
log_config
)
tests/tap.py
View file @
bda8ed3f
import
argparse
import
logging
from
src.server
import
GestureServer
from
src.window
import
FullscreenWindow
from
src.trackers.tap
import
TapTracker
from
src.logger
import
Logger
# Parse arguments
parser
=
argparse
.
ArgumentParser
(
description
=
'Basic test program for usage '
'of multi-touch API.'
)
parser
.
add_argument
(
'--log'
,
metavar
=
'LOG_LEVEL'
,
default
=
'INFO'
,
choices
=
[
'DEBUG'
,
'INFO'
,
'WARNING'
],
help
=
'set log level (defaults to INFO)'
)
parser
.
add_argument
(
'--logfile'
,
metavar
=
'FILENAME'
,
help
=
'filename for the log file (the log is printed to '
'stdout by default)'
)
args
=
parser
.
parse_args
()
# Configure logger
log_config
=
{
'level'
:
getattr
(
logging
,
args
.
log
)}
if
args
.
logfile
:
log_config
[
'filename'
]
=
args
.
logfile
Logger
.
configure
(
**
log_config
)
import
tests.parse_arguments
# Create server
server
=
GestureServer
()
...
...
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