Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
mantidproject
mantid
Commits
6a08675e
Commit
6a08675e
authored
Jun 02, 2020
by
Conor Finn
Browse files
Fix tests failing on build servers
RE #28499
parent
d3fd9f0c
Changes
5
Hide whitespace changes
Inline
Side-by-side
Framework/DataHandling/test/LoadILLSANSTest.h
View file @
6a08675e
...
...
@@ -37,13 +37,7 @@ public:
static
LoadILLSANSTest
*
createSuite
()
{
return
new
LoadILLSANSTest
();
}
static
void
destroySuite
(
LoadILLSANSTest
*
suite
)
{
delete
suite
;
}
void
setUp
()
override
{
ConfigService
::
Instance
().
appendDataSearchSubDir
(
"ILL/D11/"
);
ConfigService
::
Instance
().
appendDataSearchSubDir
(
"ILL/D22/"
);
ConfigService
::
Instance
().
appendDataSearchSubDir
(
"ILL/D33/"
);
ConfigService
::
Instance
().
appendDataSearchSubDir
(
"ILL/D16/"
);
ConfigService
::
Instance
().
setFacility
(
"ILL"
);
}
void
setUp
()
override
{
ConfigService
::
Instance
().
setFacility
(
"ILL"
);
}
void
tearDown
()
override
{
AnalysisDataService
::
Instance
().
clear
();
}
...
...
Framework/Kernel/src/ConfigService.cpp
View file @
6a08675e
...
...
@@ -1504,7 +1504,7 @@ void ConfigServiceImpl::appendDataSearchDir(const std::string &path) {
if
(
!
isInDataSearchList
(
dirPath
.
toString
()))
{
auto
newSearchString
=
Strings
::
join
(
std
::
begin
(
m_dataSearchDirs
),
std
::
end
(
m_dataSearchDirs
),
";"
);
newSearchString
.
append
(
path
);
newSearchString
.
append
(
";"
+
path
);
setString
(
"datasearch.directories"
,
newSearchString
);
}
}
...
...
Framework/PythonInterface/test/python/mantid/kernel/ConfigServiceTest.py
View file @
6a08675e
# Mantid Repository : https://github.com/mantidproject/mantid
# Mantid Repository : https://github.com/mantidproject/mantid
#
# Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
# NScD Oak Ridge National Laboratory, European Spallation Source,
...
...
@@ -109,12 +110,13 @@ class ConfigServiceTest(unittest.TestCase):
def
test_appending_paths
(
self
):
new_path_list
=
self
.
_setup_test_areas
()
try
:
num_of_dirs
=
len
(
config
.
getDataSearchDirs
())
config
.
appendDataSearchDir
(
str
(
new_path_list
[
0
]))
updated_paths
=
config
.
getDataSearchDirs
()
finally
:
self
.
_clean_up_test_areas
()
self
.
assertEqual
(
4
,
len
(
updated_paths
))
self
.
assertEqual
(
num_of_dirs
+
1
,
len
(
updated_paths
))
def
test_setting_log_channel_levels
(
self
):
testhelpers
.
assertRaisesNothing
(
self
,
config
.
setLogLevel
,
4
,
True
)
...
...
@@ -153,7 +155,7 @@ class ConfigServiceTest(unittest.TestCase):
'loading.multifile'
,
'loading.multifilelimit'
,
'maskFiles.directory'
,
'pythonalgorithms.refresh.allowed'
,
'sliceviewer.nonorthogonal'
'sliceviewer.nonorthogonal'
,
########## TODO should these be documented?
'curvefitting.defaultPeak'
,
'curvefitting.findPeaksFWHM'
,
'curvefitting.findPeaksTolerance'
,
'curvefitting.guiExclude'
,
...
...
scripts/test/IndirectCommonTests.py
View file @
6a08675e
...
...
@@ -79,10 +79,10 @@ class IndirectCommonTests(unittest.TestCase):
self
.
assertRaises
(
ValueError
,
indirect_common
.
getEfixed
,
ws
.
name
())
def
test_getDefaultWorkingDirectory
(
self
):
config
[
'defaultsave.directory'
]
=
os
.
path
.
expanduser
(
'~
/
'
)
config
[
'defaultsave.directory'
]
=
os
.
path
.
join
(
os
.
path
.
expanduser
(
'~'
)
,
""
)
workdir
=
indirect_common
.
getDefaultWorkingDirectory
()
self
.
assertEqual
(
os
.
path
.
expanduser
(
'~
/
'
),
workdir
,
"The working directory does not match the expected one"
)
self
.
assertEqual
(
os
.
path
.
join
(
os
.
path
.
expanduser
(
'~'
),
""
),
workdir
,
"The working directory does not match the expected one"
)
def
test_getDefaultWorkingDirectory_failure
(
self
):
config
[
'defaultsave.directory'
]
=
''
...
...
scripts/test/SANS/gui_logic/add_runs_presenter_test.py
View file @
6a08675e
...
...
@@ -370,8 +370,8 @@ class AddRunsDefaultSettingsTest(unittest.TestCase):
def
test_that_if_output_directory_is_empty_default_save_directory_is_used_instead
(
self
):
default_dir
=
os
.
path
.
join
(
"default"
,
"save"
,
"directory"
)
ConfigService
[
"defaultsave.directory"
]
=
default_dir
# ConfigService
returns an absolute path when calle
d.
default_dir
=
os
.
path
.
join
(
os
.
getcwd
(),
default_dir
,
""
)
# ConfigService
may do some conversion in the backgroun
d.
default_dir
=
ConfigService
[
"defaultsave.directory"
]
output_dir
=
self
.
presenter
.
set_output_directory
(
""
)
ConfigService
[
"defaultsave.directory"
]
=
""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment