Skip to content
GitLab
Explore
Projects
Groups
Snippets
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
2 years ago
by
BO ZHANG
Browse files
Options
Download
Email Patches
Plain Diff
added unit test for demo function
parent
574af1d3
Pipeline
#155
passed with stages
in 18 seconds
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
csst_proto/some_other_modules.py
+3
-5
csst_proto/some_other_modules.py
csst_proto/top_level_interface.py
+2
-2
csst_proto/top_level_interface.py
tests/test_other_functions.py
+11
-0
tests/test_other_functions.py
with
16 additions
and
7 deletions
+16
-7
csst_proto/some_other_modules.py
+
3
-
5
View file @
ec8ee36a
def
an_arbitrary_functions
(
*
args
):
def
a_demo_function
(
*
args
):
""" an arbitrary function """
""" a demo function """
print
(
"Hi, this is an arbitrary function."
)
return
None
for
_
in
args
:
print
(
_
)
This diff is collapsed.
Click to expand it.
csst_proto/top_level_interface.py
+
2
-
2
View file @
ec8ee36a
from
.flip_image
import
flip_image
,
read_test_image
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"
]
This diff is collapsed.
Click to expand it.
tests/test_other_functions.py
0 → 100644
+
11
-
0
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
)
This diff is collapsed.
Click to expand it.
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
Menu
Explore
Projects
Groups
Snippets