Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
opcua-asyncio
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
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nikola Balog
opcua-asyncio
Commits
7f5d17e6
Commit
7f5d17e6
authored
Dec 20, 2015
by
olivier R-D
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
start work on tests for command lines
parent
510f7f55
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
0 deletions
+28
-0
tests/tests.py
tests/tests.py
+28
-0
No files found.
tests/tests.py
View file @
7f5d17e6
...
...
@@ -3,6 +3,7 @@
import
sys
sys
.
path
.
insert
(
0
,
".."
)
sys
.
path
.
insert
(
0
,
"."
)
import
subprocess
import
time
import
logging
import
math
...
...
@@ -922,6 +923,33 @@ class AdminTestClient(unittest.TestCase, CommonTests):
self
.
assertEqual
(
v_ro
.
get_value
(),
2
)
class
TestCmdLines
(
unittest
.
TestCase
):
'''
Test command lines
'''
@
classmethod
def
setUpClass
(
self
):
self
.
srv
=
Server
()
self
.
srv_url
=
'opc.tcp://localhost:%d'
%
port_num2
self
.
srv
.
set_endpoint
(
self
.
srv_url
)
objects
=
self
.
srv
.
get_objects_node
()
obj
=
objects
.
add_object
(
4
,
"browsetest"
)
var
=
obj
.
add_variable
(
4
,
"variable"
,
1.999
)
self
.
srv
.
start
()
def
test_uals
(
self
):
s
=
subprocess
.
check_output
([
"python3"
,
"tools/uals"
,
"--url"
,
self
.
srv_url
])
self
.
assertIn
(
b"i=85"
,
s
)
self
.
assertNotIn
(
b"i=89"
,
s
)
self
.
assertNotIn
(
b"1.999"
,
s
)
s
=
subprocess
.
check_output
([
"python3"
,
"tools/uals"
,
"--url"
,
self
.
srv_url
,
"-d"
,
"3"
])
self
.
assertIn
(
b"1.999"
,
s
)
@
classmethod
def
tearDownClass
(
self
):
self
.
srv
.
stop
()
class
TestServer
(
unittest
.
TestCase
,
CommonTests
):
...
...
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