def test_make_enum_identifiers_bug_803570(self): # LP: #803570 describes that make_enum() allows non-identifiers as # enum value names. try: make_enum('Foo', '1 2 3') except ValueError as exc: self.assertEqual(exc.args[0], 'non-identifiers: 1 2 3') else: raise AssertionError('Expected a ValueError')
def test_make_enum_deprecated(self): # LP: #839529: deprecate the make_enum() API and use the much better # make() API. with warnings.catch_warnings(record=True) as seen: # Cause all warnings to always be triggered. warnings.simplefilter('always') make_enum('Foo', 'a b c') self.assertEqual(len(seen), 1) self.assertTrue(issubclass(seen[0].category, DeprecationWarning)) self.assertEqual(seen[0].message.args[0], 'make_enum() is deprecated; use make() instead')
return None infoWavelets = {'haar': u'Haar (step function)', 'db': u'Daubechies (compactly supported orthonormal)', 'sym': u'Symlets (nearly symmetrical db)', 'coif': u'Coiflets (symmetrical)', # <--- 'bior': u'Biorthogonal (linear phase property)', 'rbio': u'Reverse biorthogonal', 'dmey': u'Discrete approximation of Meyer wavelet (scaling in frequency domain)', # mexican hat # morlet } #----------- WT ------------# try: WT = make_enum('WT', 'StationaryWT DiscreteWT') #--------- models ----------# Models = make_enum('Models', 'Holt_Winters Harmonic_Regression Least_Squares_Fit ARIMA \ ETS StructTS Cubic_Splines') # GARCH ETS StructTS Cubic_Splines') #-------- gui tabs ---------# Tabs = make_enum('Tabs', 'Decomposition Model Simulation Results') Tabs.Data = 0 except NameError, e: print e #------ gui tooltips -------#