On 4/14/2010 11:19 AM, J. Cliff Dyer wrote:
On Wed, 2010-04-14 at 15:51 +0100, john maclean wrote:
self.assertEqual(platform.__builtins__.__class__, dict,
"platform.__class__ supposed to be dict")
self.assertEqual(platform.__name__, 'platform' )
The preferred spelling for:
platform.__bui
On Wed, 2010-04-14 at 15:51 +0100, john maclean wrote:
> self.assertEqual(platform.__builtins__.__class__, dict,
> "platform.__class__ supposed to be dict")
> self.assertEqual(platform.__name__, 'platform' )
The preferred spelling for:
platform.__builtins__.__class__
would be
type(pla
On 14 April 2010 09:09, Gabriel Genellina wrote:
> En Tue, 13 Apr 2010 11:01:19 -0300, John Maclean
> escribió:
>
>> Is there an error in my syntax? Why is my test failing? Line 16.
>>
>> ==
>> FAIL: platform.__builtins__.blah
>>
En Tue, 13 Apr 2010 11:01:19 -0300, John Maclean
escribió:
Is there an error in my syntax? Why is my test failing? Line 16.
==
FAIL: platform.__builtins__.blah
The problem is that the class of platform.__builtins__ is a dict, not a
string containing the text "".
Try replacing line 16 with this:
self.assertEqual(type(platform.__builtins__), dict)
Cheers,
Cliff
On Tue, 2010-04-13 at 15:01 +0100, John Maclean wrote:
> I normally use languages uni
John Maclean wrote:
I normally use languages unit testing framework to get a better
understanding of how a language works. Right now I want to grok the
platform module;
1 #!/usr/bin/env python
2 '''a pythonic factor'''
3 import unittest
4 import platform
5
6 class TestPyfactorTestCa
On 04/13/10 15:01, John Maclean wrote:
I normally use languages unit testing framework to get a better
understanding of how a language works. Right now I want to grok the
platform module;
1 #!/usr/bin/env python
2 '''a pythonic factor'''
3 import unittest
4 import platform
5
6
On Tue, Apr 13, 2010 at 10:01 AM, John Maclean wrote:
> I normally use languages unit testing framework to get a better
> understanding of how a language works. Right now I want to grok the
> platform module;
>
>
> 1 #!/usr/bin/env python
> 2 '''a pythonic factor'''
> 3 import unittest
> 4 i