Skip to content

Commit

Permalink
running tests made easier now
Browse files Browse the repository at this point in the history
  • Loading branch information
stroeder committed Feb 14, 2017
1 parent 121b974 commit 960636d
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 30 deletions.
6 changes: 5 additions & 1 deletion CHANGES
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
----------------------------------------------------------------
Released 2.4.32 2017-02-14

Running tests made easier:
- python setup.py test
- added tox.ini

----------------------------------------------------------------
Released 2.4.31 2017-02-14

Expand Down Expand Up @@ -1332,4 +1336,4 @@ Released 2.0.0pre02 2002-02-01
----------------------------------------------------------------
Released 1.10alpha3 2000-09-19

$Id: CHANGES,v 1.408 2017/02/14 21:36:01 stroeder Exp $
$Id: CHANGES,v 1.409 2017/02/14 21:38:13 stroeder Exp $
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ include Modules/*.c Modules/*.h Modules/LICENSE
recursive-include Build *.cfg*
recursive-include Lib *.py
recursive-include Demo *.py
include tox.ini
recursive-include Tests *.py
15 changes: 15 additions & 0 deletions Tests/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
"""
python-ldap tests module package
"""

import t_cext
import t_ldap_dn
import t_ldap_filter
import t_ldap_functions
import t_ldap_modlist
import t_ldap_schema_tokenizer
import t_ldapurl
import t_ldif
import t_search

import slapd
27 changes: 0 additions & 27 deletions Tests/runtests.sh

This file was deleted.

4 changes: 3 additions & 1 deletion Tests/t_cext.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@

import unittest, slapd
import unittest
import _ldap
import logging

from Tests import slapd

reusable_server = None
def get_reusable_server():
global reusable_server
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
See http://www.python-ldap.org/ for details.
$Id: setup.py,v 1.77 2017/02/14 19:07:15 stroeder Exp $
$Id: setup.py,v 1.78 2017/02/14 21:38:13 stroeder Exp $
"""

has_setuptools = False
Expand Down Expand Up @@ -180,5 +180,6 @@ class OpenLDAP2:
],
package_dir = {'': 'Lib',},
data_files = LDAP_CLASS.extra_files,
test_suite = 'Tests',
**kwargs
)
13 changes: 13 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Tox (http://tox.testrun.org/) is a tool for running tests
# in multiple virtualenvs. This configuration file will run the
# test suite on all supported python versions. To use it, "pip install tox"
# and then run "tox" from this directory.

[tox]
envlist = py27

[testenv]
commands = {envpython} setup.py test
deps =
pyasn1
pyasn1_modules

0 comments on commit 960636d

Please sign in to comment.