Skip to content
Merged
Show file tree
Hide file tree
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
8 changes: 7 additions & 1 deletion Framework/Kernel/src/Property.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,13 @@ std::string getUnmangledTypeName(const std::type_info &type) {
if (mitr != typestrings.end()) {
return mitr->second;
}

/* if a type name looks like
N6Mantid6Kernel16EnumeratedStringINS_12_GLOBAL__N_111BinningModeEXadL_ZNS2_L16binningModeNamesEEEXadL_ZNS0_12_GLOBAL__N_114compareStringsEEEEE
we assume it is a EnumeratedStringProperty and return a "string" for it */
string type_name = type.name();
if (type_name.find("Mantid") != std::string::npos && type_name.find("EnumeratedString") != std::string::npos) {
return "string";
}
return type.name();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,7 @@ def test_alg_has_expected_doc_string(self):
)
doc = simpleapi.rebin.__doc__
self.assertGreater(len(doc), 0)
# The missing part of the expected_doc string contains "BinningMode(Input) *string* " ...
# Due to introduction of EnumeratedStringProperty the "*string*" is replaced by some
# generated during build characters in the "doc" string here.
# Cutting them out to compare two strings
self.assertEqual(doc[0:1897], expected_doc[0:1897])
self.assertEqual(doc, expected_doc)

def test_function_call_executes_correct_algorithm_when_passed_correct_args(self):
wsname = "test_function_call_executes_correct_algorithm_when_passed_correct_args"
Expand Down
3 changes: 2 additions & 1 deletion docs/sphinxext/mantiddoc/directives/properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,12 @@ def _create_properties_table(self):

for prop in alg_properties:
# Append a tuple of properties to the list.
str_prop_type = str(prop.type)
properties.append(
(
str(prop.name),
str(direction_string[prop.direction]),
property_type_dict.get(str(prop.type), str(prop.type)),
property_type_dict.get(str_prop_type, str_prop_type),
str(self._get_default_prop(prop)),
self._create_property_description_string(prop),
)
Expand Down
Loading