Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
model_server
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Christopher Randolph Rhodes
model_server
Commits
6ad29bb8
Commit
6ad29bb8
authored
8 months ago
by
Christopher Randolph Rhodes
Browse files
Options
Downloads
Patches
Plain Diff
Isolated namespace issue in test_reimporting_session_uses_same_logfile
parent
d2bb41bf
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!65
Release 2024.10.01
,
!53
conda-build configuration and project structure
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/test_session.py
+10
-2
10 additions, 2 deletions
tests/test_session.py
with
10 additions
and
2 deletions
tests/test_session.py
+
10
−
2
View file @
6ad29bb8
...
@@ -40,14 +40,22 @@ class TestGetSessionObject(unittest.TestCase):
...
@@ -40,14 +40,22 @@ class TestGetSessionObject(unittest.TestCase):
self
.
assertNotEqual
(
logfile1
,
logfile2
,
'
Restarting session does not generate new logfile
'
)
self
.
assertNotEqual
(
logfile1
,
logfile2
,
'
Restarting session does not generate new logfile
'
)
def
test_reimporting_session_uses_same_logfile
(
self
):
def
test_reimporting_session_uses_same_logfile
(
self
):
logfile1
=
self
.
sesh
.
logfile
session1
=
self
.
sesh
logfile1
=
session1
.
logfile
self
.
assertTrue
(
logfile1
.
exists
())
self
.
assertTrue
(
logfile1
.
exists
())
session2
=
base
.
session
.
session
from
base.session
import
session
as
session2
self
.
assertEqual
(
session1
,
session2
)
logfile2
=
session2
.
logfile
logfile2
=
session2
.
logfile
self
.
assertTrue
(
logfile2
.
exists
())
self
.
assertTrue
(
logfile2
.
exists
())
self
.
assertEqual
(
logfile1
,
logfile2
,
'
Reimporting session incorrectly creates new logfile
'
)
self
.
assertEqual
(
logfile1
,
logfile2
,
'
Reimporting session incorrectly creates new logfile
'
)
from
model_server.base.session
import
session
as
session3
self
.
assertEqual
(
session1
,
session3
)
logfile3
=
session3
.
logfile
self
.
assertTrue
(
logfile3
.
exists
())
self
.
assertEqual
(
logfile1
,
logfile3
,
'
Reimporting session incorrectly creates new logfile
'
)
def
test_log_warning
(
self
):
def
test_log_warning
(
self
):
msg
=
'
A test warning
'
msg
=
'
A test warning
'
self
.
sesh
.
log_info
(
msg
)
self
.
sesh
.
log_info
(
msg
)
...
...
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