|
Revision 33, 1.2 kB
(checked in by mk, 4 years ago)
|
Check docstrings for use of reST (closes ticket #11).
|
- Property svn:eol-style set to
native
- Property svn:keywords set to
Author Date Id Revision
|
| Line | |
|---|
| 1 |
|
|---|
| 2 |
from _mockup_cheesecake import MockupCheesecakeTest |
|---|
| 3 |
from _helper_cheesecake import set |
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
class TestNoTestFiles(MockupCheesecakeTest): |
|---|
| 7 |
def test_discover_no_test_files(self): |
|---|
| 8 |
py_files = self.prefix_with_package_name(['main.py', 'module.py']) |
|---|
| 9 |
self.create_files(py_files) |
|---|
| 10 |
self.cheesecake.walk_pkg() |
|---|
| 11 |
|
|---|
| 12 |
assert set(self.cheesecake.pkg_files['py']) == set(py_files) |
|---|
| 13 |
assert self.cheesecake.pkg_files['pyc'] == [] |
|---|
| 14 |
assert self.cheesecake.pkg_files['pyo'] == [] |
|---|
| 15 |
assert self.cheesecake.pkg_files['test'] == [] |
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 |
class TestPycPyoFiles(MockupCheesecakeTest): |
|---|
| 19 |
def test_some_pyc_and_pyo_files(self): |
|---|
| 20 |
py_files = self.prefix_with_package_name(['main.py']) |
|---|
| 21 |
pyc_files = self.prefix_with_package_name(['main.pyc', 'missing.pyc']) |
|---|
| 22 |
pyo_files = self.prefix_with_package_name(['main.pyo', 'optimised.pyo']) |
|---|
| 23 |
|
|---|
| 24 |
self.create_files(py_files + pyc_files + pyo_files) |
|---|
| 25 |
self.cheesecake.walk_pkg() |
|---|
| 26 |
|
|---|
| 27 |
assert set(self.cheesecake.pkg_files['py']) == set(py_files) |
|---|
| 28 |
assert set(self.cheesecake.pkg_files['pyc']) == set(pyc_files) |
|---|
| 29 |
assert set(self.cheesecake.pkg_files['pyo']) == set(pyo_files) |
|---|
| 30 |
assert self.cheesecake.pkg_files['test'] == [] |
|---|