Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
simuDAtor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Computer Engineering
simuDAtor
Merge requests
!11
Fix broken tests after reset
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Fix broken tests after reset
fix_reset
into
main
Overview
0
Commits
2
Pipelines
1
Changes
2
Merged
Johannes Kung
requested to merge
fix_reset
into
main
11 months ago
Overview
0
Commits
2
Pipelines
1
Changes
2
Expand
Closes
#36 (closed)
0
0
Merge request reports
Compare
main
main (base)
and
latest version
latest version
c0024133
2 commits,
11 months ago
2 files
+
9
−
5
Side-by-side
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
test/test_core/test_processor.py
+
7
−
3
Options
from
simudator.core.module
import
Module
from
simudator.core.processor
import
Processor
from
simudator.core.processor
import
Processor
TEST_PATH
=
"
test/test_core/processor_state_test.txt
"
TEST_PATH
=
"
test/test_core/processor_state_test.txt
"
class
Dummymodule
:
class
Dummymodule
(
Module
)
:
def
__init__
(
self
,
name
):
def
__init__
(
self
,
name
):
self
.
name
=
name
self
.
name
=
name
self
.
string
=
None
self
.
string
=
None
def
load_from_str
(
self
,
string
):
def
load_from_str
(
self
,
state_
string
):
self
.
string
=
string
self
.
string
=
state_
string
def
get_string
(
self
):
def
get_string
(
self
):
return
self
.
string
return
self
.
string
def
reset
(
self
):
self
.
string
=
""
def
test_load_from_file
():
def
test_load_from_file
():
cpu
=
Processor
()
cpu
=
Processor
()
Loading