Back to index

enigmail  1.4.3
Public Member Functions
unit-writemozinfo.TestBuildDict Class Reference

List of all members.

Public Member Functions

def testMissing
def testWin
def testLinux
def testMac
def testMacUniversal
def testAndroid
def testX86
def testARM
def testUnknown
def testDebug
def testCrashreporter

Detailed Description

Definition at line 11 of file unit-writemozinfo.py.


Member Function Documentation

def unit-writemozinfo.TestBuildDict.testAndroid (   self)

Definition at line 83 of file unit-writemozinfo.py.

00083 
00084     def testAndroid(self):
00085         d = build_dict({'OS_TARGET':'Android',
00086                         'TARGET_CPU':'arm',
00087                         'MOZ_WIDGET_TOOLKIT':'android'})
00088         self.assertEqual('android', d['os'])
00089         self.assertEqual('arm', d['processor'])
00090         self.assertEqual('android', d['toolkit'])
00091         self.assertEqual(32, d['bits'])

Here is the call graph for this function:

def unit-writemozinfo.TestBuildDict.testARM (   self)
Test that all arm CPU architectures => arm.

Definition at line 106 of file unit-writemozinfo.py.

00106 
00107     def testARM(self):
00108         """
00109         Test that all arm CPU architectures => arm.
00110         """
00111         d = build_dict({'OS_TARGET':'Linux',
00112                         'TARGET_CPU':'arm',
00113                         'MOZ_WIDGET_TOOLKIT':'gtk2'})
00114         self.assertEqual('arm', d['processor'])
00115 
00116         d = build_dict({'OS_TARGET':'Linux',
00117                         'TARGET_CPU':'armv7',
00118                         'MOZ_WIDGET_TOOLKIT':'gtk2'})
00119         self.assertEqual('arm', d['processor'])

Here is the call graph for this function:

def unit-writemozinfo.TestBuildDict.testCrashreporter (   self)
Test that crashreporter values are properly detected.

Definition at line 148 of file unit-writemozinfo.py.

00148 
00149     def testCrashreporter(self):
00150         """
00151         Test that crashreporter values are properly detected.
00152         """
00153         d = build_dict({'OS_TARGET':'Linux',
00154                         'TARGET_CPU':'i386',
00155                         'MOZ_WIDGET_TOOLKIT':'gtk2'})
00156         self.assertEqual(False, d['crashreporter'])
00157         
00158         d = build_dict({'OS_TARGET':'Linux',
00159                         'TARGET_CPU':'i386',
00160                         'MOZ_WIDGET_TOOLKIT':'gtk2',
00161                         'MOZ_CRASHREPORTER':'1'})
00162         self.assertEqual(True, d['crashreporter'])

Here is the call graph for this function:

def unit-writemozinfo.TestBuildDict.testDebug (   self)
Test that debug values are properly detected.

Definition at line 133 of file unit-writemozinfo.py.

00133 
00134     def testDebug(self):
00135         """
00136         Test that debug values are properly detected.
00137         """
00138         d = build_dict({'OS_TARGET':'Linux',
00139                         'TARGET_CPU':'i386',
00140                         'MOZ_WIDGET_TOOLKIT':'gtk2'})
00141         self.assertEqual(False, d['debug'])
00142         
00143         d = build_dict({'OS_TARGET':'Linux',
00144                         'TARGET_CPU':'i386',
00145                         'MOZ_WIDGET_TOOLKIT':'gtk2',
00146                         'MOZ_DEBUG':'1'})
00147         self.assertEqual(True, d['debug'])

Here is the call graph for this function:

def unit-writemozinfo.TestBuildDict.testLinux (   self)

Definition at line 30 of file unit-writemozinfo.py.

00030 
00031     def testLinux(self):
00032         d = build_dict({'OS_TARGET':'Linux',
00033                         'TARGET_CPU':'i386',
00034                         'MOZ_WIDGET_TOOLKIT':'gtk2'})
00035         self.assertEqual('linux', d['os'])
00036         self.assertEqual('x86', d['processor'])
00037         self.assertEqual('gtk2', d['toolkit'])
00038         self.assertEqual(32, d['bits'])
00039 
00040         d = build_dict({'OS_TARGET':'Linux',
00041                         'TARGET_CPU':'x86_64',
00042                         'MOZ_WIDGET_TOOLKIT':'gtk2'})
00043         self.assertEqual('linux', d['os'])
00044         self.assertEqual('x86_64', d['processor'])
00045         self.assertEqual('gtk2', d['toolkit'])
00046         self.assertEqual(64, d['bits'])

Here is the call graph for this function:

def unit-writemozinfo.TestBuildDict.testMac (   self)

Definition at line 47 of file unit-writemozinfo.py.

00047 
00048     def testMac(self):
00049         d = build_dict({'OS_TARGET':'Darwin',
00050                         'TARGET_CPU':'i386',
00051                         'MOZ_WIDGET_TOOLKIT':'cocoa'})
00052         self.assertEqual('mac', d['os'])
00053         self.assertEqual('x86', d['processor'])
00054         self.assertEqual('cocoa', d['toolkit'])
00055         self.assertEqual(32, d['bits'])
00056 
00057         d = build_dict({'OS_TARGET':'Darwin',
00058                         'TARGET_CPU':'x86_64',
00059                         'MOZ_WIDGET_TOOLKIT':'cocoa'})
00060         self.assertEqual('mac', d['os'])
00061         self.assertEqual('x86_64', d['processor'])
00062         self.assertEqual('cocoa', d['toolkit'])
00063         self.assertEqual(64, d['bits'])

Here is the call graph for this function:

def unit-writemozinfo.TestBuildDict.testMacUniversal (   self)

Definition at line 64 of file unit-writemozinfo.py.

00064 
00065     def testMacUniversal(self):
00066         d = build_dict({'OS_TARGET':'Darwin',
00067                         'TARGET_CPU':'i386',
00068                         'MOZ_WIDGET_TOOLKIT':'cocoa',
00069                         'UNIVERSAL_BINARY': '1'})
00070         self.assertEqual('mac', d['os'])
00071         self.assertEqual('universal-x86-x86_64', d['processor'])
00072         self.assertEqual('cocoa', d['toolkit'])
00073         self.assertFalse('bits' in d)
00074 
00075         d = build_dict({'OS_TARGET':'Darwin',
00076                         'TARGET_CPU':'x86_64',
00077                         'MOZ_WIDGET_TOOLKIT':'cocoa',
00078                         'UNIVERSAL_BINARY': '1'})
00079         self.assertEqual('mac', d['os'])
00080         self.assertEqual('universal-x86-x86_64', d['processor'])
00081         self.assertEqual('cocoa', d['toolkit'])
00082         self.assertFalse('bits' in d)

Here is the call graph for this function:

def unit-writemozinfo.TestBuildDict.testMissing (   self)
Test that missing required values raises.

Definition at line 12 of file unit-writemozinfo.py.

00012 
00013     def testMissing(self):
00014         """
00015         Test that missing required values raises.
00016         """
00017         self.assertRaises(Exception, build_dict, {})
00018         self.assertRaises(Exception, build_dict, {'OS_TARGET':'foo'})
00019         self.assertRaises(Exception, build_dict, {'TARGET_CPU':'foo'})
00020         self.assertRaises(Exception, build_dict, {'MOZ_WIDGET_TOOLKIT':'foo'})

def unit-writemozinfo.TestBuildDict.testUnknown (   self)
Test that unknown values pass through okay.

Definition at line 120 of file unit-writemozinfo.py.

00120 
00121     def testUnknown(self):
00122         """
00123         Test that unknown values pass through okay.
00124         """
00125         d = build_dict({'OS_TARGET':'RandOS',
00126                         'TARGET_CPU':'cptwo',
00127                         'MOZ_WIDGET_TOOLKIT':'foobar'})
00128         self.assertEqual("randos", d["os"])
00129         self.assertEqual("cptwo", d["processor"])
00130         self.assertEqual("foobar", d["toolkit"])
00131         # unknown CPUs should not get a bits value
00132         self.assertFalse("bits" in d)
        

Here is the call graph for this function:

def unit-writemozinfo.TestBuildDict.testWin (   self)

Definition at line 21 of file unit-writemozinfo.py.

00021 
00022     def testWin(self):
00023         d = build_dict({'OS_TARGET':'WINNT',
00024                         'TARGET_CPU':'i386',
00025                         'MOZ_WIDGET_TOOLKIT':'windows'})
00026         self.assertEqual('win', d['os'])
00027         self.assertEqual('x86', d['processor'])
00028         self.assertEqual('windows', d['toolkit'])
00029         self.assertEqual(32, d['bits'])

Here is the call graph for this function:

def unit-writemozinfo.TestBuildDict.testX86 (   self)
Test that various i?86 values => x86.

Definition at line 92 of file unit-writemozinfo.py.

00092 
00093     def testX86(self):
00094         """
00095         Test that various i?86 values => x86.
00096         """
00097         d = build_dict({'OS_TARGET':'WINNT',
00098                         'TARGET_CPU':'i486',
00099                         'MOZ_WIDGET_TOOLKIT':'windows'})
00100         self.assertEqual('x86', d['processor'])
00101 
00102         d = build_dict({'OS_TARGET':'WINNT',
00103                         'TARGET_CPU':'i686',
00104                         'MOZ_WIDGET_TOOLKIT':'windows'})
00105         self.assertEqual('x86', d['processor'])

Here is the call graph for this function:


The documentation for this class was generated from the following file: