Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
csst-pipeline
csst_proto
Commits
ec8ee36a
Commit
ec8ee36a
authored
Sep 22, 2022
by
BO ZHANG
🏀
Browse files
added unit test for demo function
parent
574af1d3
Pipeline
#155
passed with stages
in 18 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
csst_proto/some_other_modules.py
View file @
ec8ee36a
def
an_arbitrary_functions
(
*
args
):
""" an arbitrary function """
print
(
"Hi, this is an arbitrary function."
)
for
_
in
args
:
print
(
_
)
def
a_demo_function
(
*
args
):
""" a demo function """
return
None
csst_proto/top_level_interface.py
View file @
ec8ee36a
from
.flip_image
import
flip_image
,
read_test_image
from
.some_other_modules
import
a
n_arbitrary
_function
s
from
.some_other_modules
import
a
_demo
_function
__all__
=
[
"flip_image"
,
"read_test_image"
,
"a
n_arbitrary
_function
s
"
]
__all__
=
[
"flip_image"
,
"read_test_image"
,
"a
_demo
_function"
]
tests/test_other_functions.py
0 → 100644
View file @
ec8ee36a
import
unittest
from
csst_proto.top_level_interface
import
a_demo_function
class
TestCaseDemoFunction
(
unittest
.
TestCase
):
def
test_demo_function
(
self
):
# flip test image
self
.
assertTrue
(
a_demo_function
(
1
)
is
None
)
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment