Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions test/test-config.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,13 @@ def setUpClass(cls):

@classmethod
def tearDownClass(cls):
# IMPORTANT: reset the SysConf singleton to an empty config BEFORE
# deleting the temp file. SysConf caches _config in memory; simply
# deleting the file leaves the 224-char NQN in the cache. When pytest
# runs all test files in one process, trid.TID.__init__ unconditionally
# evaluates sysconf.hostnqn (as the default arg to dict.get), so every
# TID construction in later test files would hit sys.exit.
conf.SysConf().set_conf_file('/dev/null')
if os.path.exists(cls.FNAME):
os.remove(cls.FNAME)

Expand Down
Loading