Skip to content

Commit

Permalink
Re #10836 Further fixing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
abuts committed Jan 8, 2015
1 parent 1c2c952 commit 9feabe2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
Expand Up @@ -362,7 +362,7 @@ def __init__(self):


def __get__(self,instance,type=None):
return self.__spectra_to_monitors_list
return self._spectra_to_monitors_list

def __set__(self,instance,spectra_list):
""" Sets copy spectra to monitors variable as a list of monitors using different forms of input """
Expand Down
4 changes: 2 additions & 2 deletions Code/Mantid/scripts/Inelastic/Direct/PropertyManager.py
Expand Up @@ -388,7 +388,7 @@ def update_defaults_from_instrument(self,pInstrument,ignore_changes=False):
for change in old_changes:
dependencies = None
try:
prop = self.__class__.__dict__[change]
prop = self.access_fprop(change)
dependencies = prop.dependencies()
except:
pass
Expand All @@ -410,7 +410,7 @@ def update_defaults_from_instrument(self,pInstrument,ignore_changes=False):

try: # this is reliability check, and except ideally should never be hit. May occur if old IDF contains
# properties, not present in recent IDF.
cur_val = getattr(self,name)
cur_val = getattr(self,key)
except:
self.log("property {0} or its derivatives have not been found in existing IDF. Ignoring this property"\
.format(key),'warning')
Expand Down
5 changes: 3 additions & 2 deletions Code/Mantid/scripts/test/DirectPropertyManagerTest.py
Expand Up @@ -116,7 +116,8 @@ def test_hartmask_plus_or_only(self):
def test_set_spectra_to_mon(self):
propman = self.prop_man

self.assertTrue(propman.spectra_to_monitors_list is None);
ll = propman.spectra_to_monitors_list
self.assertTrue(ll is None)

propman.spectra_to_monitors_list = 35;
self.assertTrue(isinstance(propman.spectra_to_monitors_list,list));
Expand Down Expand Up @@ -647,7 +648,7 @@ def test_hadmask_options_locked(self):

# verify if changed properties list does not change anything
changed_prop=propman1.update_defaults_from_instrument( ws.getInstrument())
self.assertEqual(len(changed_prop),1)
self.assertEqual(len(changed_prop),2)
self.assertFalse(propman1.use_hard_mask_only)
self.assertEqual(propman1.hard_mask_file,'a_hard_mask_file.msk')
self.assertTrue(propman1.run_diagnostics)
Expand Down

0 comments on commit 9feabe2

Please sign in to comment.