Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
sot-tools
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
Stack Of Tasks
sot-tools
Commits
1f2a7814
Commit
1f2a7814
authored
4 years ago
by
Guilhem Saurel
Browse files
Options
Downloads
Patches
Plain Diff
[Python][Tests] ensure oscillator loads fine
fix #17
parent
e02992f8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
CMakeLists.txt
+1
-1
1 addition, 1 deletion
CMakeLists.txt
tests/CMakeLists.txt
+6
-2
6 additions, 2 deletions
tests/CMakeLists.txt
tests/python/CMakeLists.txt
+1
-0
1 addition, 0 deletions
tests/python/CMakeLists.txt
tests/python/oscillator.py
+16
-0
16 additions, 0 deletions
tests/python/oscillator.py
with
24 additions
and
3 deletions
CMakeLists.txt
+
1
−
1
View file @
1f2a7814
...
...
@@ -84,7 +84,7 @@ IF(NOT INSTALL_PYTHON_INTERFACE_ONLY)
ENDIF
(
NOT INSTALL_PYTHON_INTERFACE_ONLY
)
ADD_SUBDIRECTORY
(
src
)
#
ADD_SUBDIRECTORY(tests)
ADD_SUBDIRECTORY
(
tests
)
PKG_CONFIG_APPEND_LIBS
(
${
PROJECT_NAME
}
)
IF
(
NOT INSTALL_PYTHON_INTERFACE_ONLY
)
...
...
This diff is collapsed.
Click to expand it.
tests/CMakeLists.txt
+
6
−
2
View file @
1f2a7814
ADD_DEFINITIONS
(
-DBOOST_TEST_DYN_LINK -DBOOST_TEST_MAIN
)
ADD_UNIT_TEST
(
test_simpleseqplay test_simpleseqplay.cc
)
TARGET_LINK_LIBRARIES
(
test_simpleseqplay
${
PROJECT_NAME
}
${
Boost_LIBRARIES
}
)
#ADD_UNIT_TEST(test_simpleseqplay test_simpleseqplay.cc)
#TARGET_LINK_LIBRARIES(test_simpleseqplay ${PROJECT_NAME} ${Boost_LIBRARIES})
IF
(
BUILD_PYTHON_INTERFACE
)
ADD_SUBDIRECTORY
(
python
)
ENDIF
(
BUILD_PYTHON_INTERFACE
)
This diff is collapsed.
Click to expand it.
tests/python/CMakeLists.txt
0 → 100644
+
1
−
0
View file @
1f2a7814
ADD_PYTHON_UNIT_TEST
(
"py-oscillator"
"tests/python/oscillator.py"
)
This diff is collapsed.
Click to expand it.
tests/python/oscillator.py
0 → 100644
+
16
−
0
View file @
1f2a7814
import
unittest
from
random
import
random
from
dynamic_graph.sot.tools
import
Oscillator
class
OscillatorTest
(
unittest
.
TestCase
):
def
test_load
(
self
):
epsilon
=
random
()
osc
=
Oscillator
(
'
my oscillator
'
)
osc
.
setEpsilon
(
epsilon
)
self
.
assertEqual
(
osc
.
getEpsilon
(),
epsilon
)
if
__name__
==
'
__main__
'
:
unittest
.
main
()
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