Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

2806 [6.0.0]: Remove imp module #2809

Merged
merged 5 commits into from
Feb 27, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Replace imp in run_one.py with updated import
  • Loading branch information
krzywon committed Feb 16, 2024
commit 0defcf890dcd2138728029625477a9e062c3cceb
6 changes: 3 additions & 3 deletions test/run_one.py
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
import sys
import xmlrunner
import unittest
import imp
from importlib.machinery import SourceFileLoader
from os.path import abspath, dirname, split as splitpath, join as joinpath

import logging
@@ -19,7 +19,7 @@
sys.exit(-1)

run_py = joinpath(dirname(dirname(abspath(__file__))), 'run.py')
run = imp.load_source('sasview_run', run_py)
run = SourceFileLoader('sasview_run', run_py).load_module()
run.prepare()

#print("\n".join(sys.path))
@@ -31,5 +31,5 @@
sys.argv = [sys.argv[0]]
os.chdir(test_path)
sys.path.insert(0, test_path)
test = imp.load_source('tests',test_file)
test = SourceFileLoader('tests', test_file).load_module()
unittest.main(test, testRunner=xmlrunner.XMLTestRunner(output='logs'))