def testDeSerializeFail(self): serializedValue: str = '150,bogus' dimensions: Dimensions = Dimensions.deSerialize(serializedValue) self.assertEqual(0, dimensions.width, 'Width incorrectly deserialized') self.assertEqual(0, dimensions.height, 'Height incorrectly deserialized')
def startupSize(self) -> Dimensions: serializedDimensions: str = self._config.get( MainPreferences.MAIN_SECTION, MainPreferences.STARTUP_SIZE) return Dimensions.deSerialize(serializedDimensions)
def textDimensions(self) -> Dimensions: serializedDimensions: str = self._config.get( ValuePreferences.VALUE_PREFERENCES_SECTION, ValuePreferences.TEXT_DIMENSIONS) return Dimensions.deSerialize(serializedDimensions)
def orthogonalLayoutSize(self) -> Dimensions: serializedDimensions: str = self._config.get( MiscellaneousPreferences.MISCELLANEOUS_SECTION, MiscellaneousPreferences.ORTHOGONAL_LAYOUT_SIZE) return Dimensions.deSerialize(serializedDimensions)