On Sun, Aug 23, 2015 at 11:47 AM, Peter Otten <__pete...@web.de> wrote:
> boB Stepp wrote:
>
>> On Sat, Aug 22, 2015 at 3:18 AM, Peter Otten <__pete...@web.de> wrote:
>>> boB Stepp wrote:
>> ... I was not in the directory, E:\Projects\mcm. It is my
>> understanding that if I start in a particular
On Sun, Aug 23, 2015 at 11:47 AM, Peter Otten <__pete...@web.de> wrote:
> boB Stepp wrote:
>> And am I misreading the docs at
>> https://docs.python.org/3/library/unittest.html#test-discovery:
>>
>>
> -
On Sun, Aug 23, 2015 at 06:47:49PM +0200, Peter Otten wrote:
> > ... I was not in the directory, E:\Projects\mcm. It is my
> > understanding that if I start in a particular directory when I invoke
> > Python, then it looks in that location first in PYTHONPATH.
>
> No, it looks in the location
boB Stepp wrote:
> On Sat, Aug 22, 2015 at 3:18 AM, Peter Otten <__pete...@web.de> wrote:
>> boB Stepp wrote:
>>
>>> In the cold light of morning, I see that in this invocation, the path
>>> is wrong. But even if I correct it, I get the same results:
>>>
>>> e:\Projects\mcm>py -m unittest ./test/
On Sun, Aug 23, 2015 at 10:42:25AM -0500, boB Stepp wrote:
[...]
> If I try this or begin in E:\Projects\mcm and type py
> ./test/db/test_manager.py I get
>
> E:\Projects\mcm>py ./test/db/test_manager.py
> Traceback (most recent call last):
> File "./test/db/test_manager.py", line 16, in
>
On Sat, Aug 22, 2015 at 3:18 AM, Peter Otten <__pete...@web.de> wrote:
> boB Stepp wrote:
>
>> In the cold light of morning, I see that in this invocation, the path
>> is wrong. But even if I correct it, I get the same results:
>>
>> e:\Projects\mcm>py -m unittest ./test/db/test_manager.py
> [...]
boB Stepp wrote:
> In the cold light of morning, I see that in this invocation, the path
> is wrong. But even if I correct it, I get the same results:
>
> e:\Projects\mcm>py -m unittest ./test/db/test_manager.py
[...]
> ValueError: Empty module name
Make sure that there are files
./test/__init
In a message of Fri, 21 Aug 2015 06:26:11 -0700, Alex Kleider writes:
>On 2015-08-20 23:16, Peter Otten wrote:
>
>
>> Yea, breaking things is an art form ;)
>
>
>> $ python3 -m unittest -h
>> usage: python3 -m unittest [-h] [-v] [-q] [-f] [-c] [-b] [tests [tests
>> ...]]
>>
>.
>>
>> For test
On Fri, Aug 21, 2015 at 1:16 AM, Peter Otten <__pete...@web.de> wrote:
> boB Stepp wrote:
>
>> On Thu, Aug 20, 2015 at 10:13 PM, Steven D'Aprano
>> wrote:
>>> On Thu, Aug 20, 2015 at 09:01:50PM -0500, boB Stepp wrote:
>>>
>>>
import unittest
# import modules to be tested:
impor
On 2015-08-20 23:16, Peter Otten wrote:
Yea, breaking things is an art form ;)
$ python3 -m unittest -h
usage: python3 -m unittest [-h] [-v] [-q] [-f] [-c] [-b] [tests [tests
...]]
.
For test discovery all test modules must be importable from the top
level
directory of the proje
boB Stepp wrote:
> On Thu, Aug 20, 2015 at 10:13 PM, Steven D'Aprano
> wrote:
>> On Thu, Aug 20, 2015 at 09:01:50PM -0500, boB Stepp wrote:
>>
>>
>>> import unittest
>>>
>>> # import modules to be tested:
>>> import mcm.db.manager
>>>
>>> class ManagerTestCase(unittest.TestCase):
>>> def setU
On Thu, Aug 20, 2015 at 10:13 PM, Steven D'Aprano wrote:
> On Thu, Aug 20, 2015 at 09:01:50PM -0500, boB Stepp wrote:
>
>
>> import unittest
>>
>> # import modules to be tested:
>> import mcm.db.manager
>>
>> class ManagerTestCase(unittest.TestCase):
>> def setUp(self):
>> # Insert set
On Thu, Aug 20, 2015 at 09:01:50PM -0500, boB Stepp wrote:
> import unittest
>
> # import modules to be tested:
> import mcm.db.manager
>
> class ManagerTestCase(unittest.TestCase):
> def setUp(self):
> # Insert setup code here...
> pass
>
> def test_open_db(self):
>
I adopted Peter's suggestions (I think!) and now have these two paths
that are pertinent to my questions:
Projects/mcm/mcm/db/manager.py # The module I am beginning to write tests for.
Projects/mcm/test/db/test_manager.py# The file for my module tests.
The test code currently is:
import un
14 matches
Mail list logo