Re: [Tutor] Do not understand why test is running.

2015-08-23 Thread boB Stepp
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\mcmpy -m unittest ./test/db/test_manager.py [...] ValueError:

Re: [Tutor] Do not understand why test is running.

2015-08-23 Thread Steven D'Aprano
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\mcmpy ./test/db/test_manager.py Traceback (most recent call last): File ./test/db/test_manager.py, line 16, in module

Re: [Tutor] Do not understand why test is running.

2015-08-23 Thread Peter Otten
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\mcmpy -m unittest ./test/db/test_manager.py

Re: [Tutor] Do not understand why test is running.

2015-08-23 Thread Steven D'Aprano
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 of the

Re: [Tutor] Do not understand why test is running.

2015-08-23 Thread boB Stepp
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 directory

Re: [Tutor] Do not understand why test is running.

2015-08-23 Thread boB Stepp
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:

Re: [Tutor] Do not understand why test is running.

2015-08-22 Thread Peter Otten
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\mcmpy -m unittest ./test/db/test_manager.py [...] ValueError: Empty module name Make sure that there are files ./test/__init__.py

Re: [Tutor] Do not understand why test is running.

2015-08-21 Thread boB Stepp
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 st...@pearwood.info wrote: On Thu, Aug 20, 2015 at 09:01:50PM -0500, boB Stepp wrote: import unittest # import modules to be tested: import

Re: [Tutor] Do not understand why test is running.

2015-08-21 Thread Alex Kleider
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

Re: [Tutor] Do not understand why test is running.

2015-08-21 Thread Laura Creighton
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 discovery all test

Re: [Tutor] Do not understand why test is running.

2015-08-21 Thread Peter Otten
boB Stepp wrote: On Thu, Aug 20, 2015 at 10:13 PM, Steven D'Aprano st...@pearwood.info 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):

Re: [Tutor] Do not understand why test is running.

2015-08-20 Thread boB Stepp
On Thu, Aug 20, 2015 at 10:13 PM, Steven D'Aprano st...@pearwood.info 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

[Tutor] Do not understand why test is running.

2015-08-20 Thread boB Stepp
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

Re: [Tutor] Do not understand why test is running.

2015-08-20 Thread Steven D'Aprano
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): pass