Oltmans wrote:
def test_first(self):
print 'first test'
process(123)
All test cases use the pattern "Assemble Activate Assert".
You are assembling a 123, and activating process(), but where is your assert? If
it is inside process() (if process is a test-side method), then
On Jan 14, 11:46 pm, exar...@twistedmatrix.com wrote:
> When you run test.py, it gets to the loadTestsFromName line. There, it
> imports the module named "test" in order to load tests from it. To
> import
> that module, it runs test.py again. By the time it finishes running the
> contents of t
On 06:33 pm, rolf.oltm...@gmail.com wrote:
Hi Python gurus,
I'm quite new to Python and have a problem. Following code resides in
a file named test.py
---
import unittest
class result(unittest.TestResult):
pass
class tee(unittest.TestCase):
def test_first(self):
print 'first te
Hi Python gurus,
I'm quite new to Python and have a problem. Following code resides in
a file named test.py
---
import unittest
class result(unittest.TestResult):
pass
class tee(unittest.TestCase):
def test_first(self):
print 'first test'
print '-'
def
Duncan Booth wrote:
Qiangning Hong wrote:
As you see, it is an OO wrapper on _extmod, which is a pyrex extension
module. The question is: how to unittest this class? As the _extmod
is hardware-dependent, I want to use a mock class to replace it in unit
test. But how can I let myclass in unittes
Qiangning Hong wrote:
> As you see, it is an OO wrapper on _extmod, which is a pyrex extension
> module. The question is: how to unittest this class? As the _extmod
> is hardware-dependent, I want to use a mock class to replace it in unit
> test. But how can I let myclass in unittest to import
* "Qiangning Hong" <[EMAIL PROTECTED]> wrote:
> I want to apply TDD (test driven development) on my project. I am
> working on a class like this (in plan):
>
> # file: myclass.py
> import _extmod
>
> class MyClass(object):
> def __init__(self):
> self.handle = _extmod.open()
>
>
I want to apply TDD (test driven development) on my project. I am
working on a class like this (in plan):
# file: myclass.py
import _extmod
class MyClass(object):
def __init__(self):
self.handle = _extmod.open()
def __del__(self):
_extmod.close(self.handle)
def some