Skip to content

Commit

Permalink
Add refactoring notes to tests module
Browse files Browse the repository at this point in the history
Refactor entry_points, add ignored packages in setup()
  • Loading branch information
bittner committed Sep 29, 2015
1 parent 8b8fb24 commit 0bea02e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
11 changes: 6 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,15 @@ def read_requirements():
classifiers=CLASSIFIERS,
install_requires=read_requirements(),
dependency_links=NON_PYPI_DEP_LINKS,
packages=find_packages(),
packages=find_packages(exclude=['docs', 'tests']),
include_package_data=True,
zip_safe=False,

tests_require=['pytest'],
cmdclass={'test': PyTest},
entry_points="""
[console_scripts]
organice-setup=organice.bin.organice_setup:startproject
""",
entry_points={
'console_scripts': [
'organice-setup = organice.bin.organice_setup:startproject',
],
},
)
9 changes: 9 additions & 0 deletions tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,12 @@
However, this makes relative imports work in test modules (e.g. helper from ``utils.py``).
"""

# NOTE 1: This file makes the 'test' folder importable! (i.e. `import tests`) Not good.
# Though, the test folder is pruned by MANIFEST.in, hence it's not installed anywhere.
# TODO: Consider inlining the tests into the package, or find a solution without relative imports.

# NOTE 2: The import of `DjangoSettingsManager` for probe_values_in_list() makes the
# test.utils dependent on an installed version of Organice. Also tests are run with
# helpers from the unit under test! No, not good.
# TODO: Make tests and test helpers independent from the implementation being tested.

0 comments on commit 0bea02e

Please sign in to comment.