Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
N
non-destructive text micropython
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
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
badge fixer
non-destructive text micropython
Commits
82af4d67
Commit
82af4d67
authored
Oct 7, 2016
by
Damien George
Browse files
Options
Downloads
Patches
Plain Diff
tests: Improve coverage of struct with test for non-compliant behaviour.
parent
dffa383b
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
tests/basics/struct1.py
+0
-12
0 additions, 12 deletions
tests/basics/struct1.py
tests/misc/non_compliant.py
+7
-0
7 additions, 0 deletions
tests/misc/non_compliant.py
tests/misc/non_compliant.py.exp
+2
-0
2 additions, 0 deletions
tests/misc/non_compliant.py.exp
with
9 additions
and
12 deletions
tests/basics/struct1.py
+
0
−
12
View file @
82af4d67
...
...
@@ -103,15 +103,3 @@ try:
print
(
struct
.
unpack_from
(
'
<b
'
,
buf
,
-
11
))
except
:
print
(
'
struct.error
'
)
# pack with too many args, not checked by uPy
#try:
# print(struct.pack('ii', 1, 2, 3))
#except:
# print('struct.error')
# pack with too few args, not checked by uPy
#try:
# print(struct.pack('ii', 1))
#except:
# print('struct.error')
This diff is collapsed.
Click to expand it.
tests/misc/non_compliant.py
+
7
−
0
View file @
82af4d67
# tests for things that are not implemented, or have non-compliant behaviour
import
array
import
ustruct
# array deletion not implemented
try
:
...
...
@@ -87,3 +88,9 @@ try:
del
[][
2
:
3
:
4
]
except
NotImplementedError
:
print
(
'
NotImplementedError
'
)
# struct pack with too many args, not checked by uPy
print
(
ustruct
.
pack
(
'
bb
'
,
1
,
2
,
3
))
# struct pack with too few args, not checked by uPy
print
(
ustruct
.
pack
(
'
bb
'
,
1
))
This diff is collapsed.
Click to expand it.
tests/misc/non_compliant.py.exp
+
2
−
0
View file @
82af4d67
...
...
@@ -12,3 +12,5 @@ NotImplementedError
NotImplementedError
NotImplementedError
NotImplementedError
b'\x01\x02'
b'\x01\x00'
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