[Python-Dev] unittest.TestResult lacks API to separate subtests

2016-06-24 Thread Ilya Kazakevich
Hello,

 

We're developing Python IDE and integrated it with unittest module using
TestResult
<https://docs.python.org/3.4/library/unittest.html#unittest.TestResult>
inheritor to track test start, end etc. With Py3K, it supports addSubTest
method, that is called after all subtests. But there is no method called
before and after _each_ subtest (like it is done for regular tests). With
out of it I can't fetch each subtest output and display it correctly.

 

I suggest to add subTestStart / subTestEnd  methods to help me with my issue
and other people with similar issues. I can send patch if you think this is
a good idea. 

 

 

Ilya Kazakevich

 

JetBrains

 <http://www.jetbrains.com/> http://www.jetbrains.com

The Drive to Develop

 

___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


[Python-Dev] 3.5 unittest does not support namespace packages for discovering

2017-03-23 Thread Ilya Kazakevich
Hello.
I have following layout:

\---tests
|   test_module.py
|   __init__.py


When I launch "python.exe" -m unittest discover -t . -s tests" it works
perfectly.
But when I remove " __init__.py" it says

 Start directory is not importable: "tests'"

``loader.py``:
if start_dir != top_level_dir:
is_not_importable = not os.path.isfile(os.path.join(start_dir,
'__init__.py'))


I believe ``__init__.py`` does not play any role since Python 3.3, am I
right?
If so, it seems to be a bug. Should I create an issue?

Ilya.
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com