2323# Insert the location of makeprojects at the begining so it's the first
2424# to be processed
2525sys .path .insert (0 , os .path .dirname (os .path .dirname (os .path .abspath (__file__ ))))
26- from makeprojects . core import Attributes , Configuration , Project , Solution
26+
2727from makeprojects .enums import PlatformTypes , ProjectTypes , IDETypes
28+ from makeprojects .core import Attributes , Configuration , Project , Solution
2829
2930########################################
3031
@@ -158,13 +159,12 @@ def test_attributes(self):
158159 # test use_mfc
159160 self .assertIsNone (a .use_mfc )
160161 a .use_mfc = "true"
161- self .assertIs (a .use_mfc , True )
162+ with self .assertRaises (ValueError ):
163+ a .use_mfc = True
162164 a .use_mfc = "false"
163- self .assertIs (a .use_mfc , False )
164- a .use_mfc = False
165- self .assertIs (a .use_mfc , False )
166165 with self .assertRaises (ValueError ):
167- a .use_mfc = "anchovy"
166+ a .use_mfc = False
167+ a .use_mfc = "anchovy"
168168 with self .assertRaises (ValueError ):
169169 a .use_mfc = self
170170 a .use_mfc = None
@@ -173,13 +173,12 @@ def test_attributes(self):
173173 # test use_mfc
174174 self .assertIsNone (a .use_atl )
175175 a .use_atl = "true"
176- self .assertIs (a .use_atl , True )
177176 a .use_atl = "false"
178- self .assertIs (a .use_atl , False )
179- a .use_atl = False
180- self .assertIs (a .use_atl , False )
181177 with self .assertRaises (ValueError ):
182- a .use_atl = "garden"
178+ a .use_atl = True
179+ with self .assertRaises (ValueError ):
180+ a .use_atl = False
181+ a .use_atl = "garden"
183182 with self .assertRaises (ValueError ):
184183 a .use_atl = self
185184 a .use_atl = None
@@ -188,13 +187,13 @@ def test_attributes(self):
188187 # test clr_support
189188 self .assertIsNone (a .clr_support )
190189 a .clr_support = "true"
191- self .assertIs (a .clr_support , True )
190+ with self .assertRaises (ValueError ):
191+ a .clr_support = True
192192 a .clr_support = "n"
193- self .assertIs (a .clr_support , False )
194- a .clr_support = False
195- self .assertIs (a .clr_support , False )
196193 with self .assertRaises (ValueError ):
197- a .clr_support = "elvis"
194+ a .clr_support = False
195+ with self .assertRaises (ValueError ):
196+ a .clr_support = 99
198197 with self .assertRaises (ValueError ):
199198 a .clr_support = self
200199 a .clr_support = None
0 commit comments