Commit Graph

24 Commits

Author SHA1 Message Date
Christian Heimes
1e06a5195b Use pytest conftest.py and drop pytest.ini
Let's replace some ugly hacks with proper pytest conftest.py hooks.
Test initialization of ipalib.api is now handled in
pytest_cmdline_main(). Pytest plugins, markers and ignores are also
moved into conftest.py. Additional guards make it possible to run tests
without ipaserver installed.

I added confcutdir to ensure that pytest does not leave our project
space. Pytest used pytest.ini or setup.py before but pytest.ini is gone.

Signed-off-by: Christian Heimes <cheimes@redhat.com>
Reviewed-By: Milan Kubik <mkubik@redhat.com>
2017-01-05 17:37:02 +01:00
Petr Viktorin
bca6a147e6 Switch make-test to pytest
The unused capability to run on multiple Python versions is removed,
and needed arguments are now listed in pytest.ini,
leaving just a simple call to the actual test runner.

https://fedorahosted.org/freeipa/ticket/4610

Reviewed-By: Tomas Babej <tbabej@redhat.com>
2014-11-21 12:14:44 +01:00
Petr Viktorin
05f612e58a Do not hardcode path to ipa-getkeytab in tests
Using the in-tree binary makes testing outside the source tree
impossible.
Use ipa-getkeytab from $PATH, and add the directory to $PATH when
running the in-tree tests.

Part of the work for https://fedorahosted.org/freeipa/ticket/3654

Reviewed-By: Martin Kosek <mkosek@redhat.com>
2014-03-13 15:52:18 +01:00
Xiao-Long Chen
5e96fbc22a Use /usr/bin/python2
Part of the effort to port FreeIPA to Arch Linux,
where Python 3 is the default.

FreeIPA hasn't been ported to Python 3, so the code must be modified to
run /usr/bin/python2

https://fedorahosted.org/freeipa/ticket/3438

Updated by pviktori@redhat.com
2014-01-03 09:46:05 +01:00
Tomas Babej
cbca3bafe5 Make sure appropriate exit status is returned in make-test
The make-test script now returns 1 in case that any of the test
cases that were run failed.
2013-02-25 13:32:34 +01:00
Petr Viktorin
fca43ccd47 Pass make-test arguments through to Nose
Currently, our test script forwards a select few command line arguments
to nosetests.
This patch removes the filtering, passing all arguments through.
This allows things like disabling output redirection (--nocapture),
dropping into a debugger (--pdb, --pdb-failures), coverage reporting
(--with-cover, if installed), etc.

https://fedorahosted.org/freeipa/ticket/2135
2012-04-11 22:20:07 -04:00
Rob Crittenden
d7bd9138c8 Execute /usr/bin/python directly instead of /usr/bin/env python
ticket 608
2011-01-14 16:27:48 -05:00
Jason Gerard DeRose
ab1aba5a9a Added Fuzzy docstrings; make-test now runs doctests in tests/*; fixed 'existant' mispelling 2009-12-18 10:56:13 -05:00
Rob Crittenden
7105a0c0d6 Add pdb options to make-test to pass onto nosetests 2009-12-11 22:41:39 -07:00
Jason Gerard DeRose
b6e4972e7f Take 2: Extensible return values and validation; steps toward a single output_for_cli(); enable more webUI stuff 2009-12-10 08:29:15 -07:00
Rob Crittenden
e62bbab37a Let the updater delete entries and add small test harness
In order to run the tests you must put your DM password into
~/.ipa/.dmpw

Some tests are expected to generate errors. Don't let any ERROR
messages from the updater fool you, watch the pass/fail of the nosetests.
2009-10-05 13:25:42 -06:00
Jason Gerard DeRose
87480b7bde Re-enable doctest, fix broken docstrings 2009-05-13 14:22:09 -04:00
Jason Gerard DeRose
eb73a4fef5 Renamed f_ra.py plugin to cert.py 2009-02-17 16:03:07 -05:00
Jason Gerard DeRose
48a278047d Mostly got the test_xmlrpc/ tests working again 2009-02-03 15:29:04 -05:00
Jason Gerard DeRose
0327b83899 New Param: all docstring examples now pass under doctests 2009-01-14 20:36:17 -07:00
Jason Gerard DeRose
69acff450c New Param: removed more depreciated 'import ipa_types' 2009-01-14 12:00:47 -07:00
Jason Gerard DeRose
fd43b39145 Moved setting of run-time variables from Env.__init__() to Env._bootstrap() 2008-12-22 23:09:35 -07:00
Jason Gerard DeRose
5c47b56d14 Finished kwarg validation and extension mechanism in parameter.Param 2008-12-11 18:07:54 -07:00
Jason Gerard DeRose
7e21ea5ad8 Fixed Warning messages about log dir in unit test 2008-12-08 16:56:24 -07:00
Jason Gerard DeRose
8a2902a2a2 Re-enable Python2.4 tests and fixed some small things broken under Python2.4 2008-12-08 12:34:38 -07:00
Jason Gerard DeRose
c26a3c8542 Finished fist draft of plugin tutorial in ipalib/__init__.py docstring 2008-11-07 02:26:38 -07:00
Jason Gerard DeRose
f80beb948b Added ipalib/constants.py; added Env._load_config() method along with comprehensive unit tests for same 2008-10-24 15:07:07 -06:00
Jason Gerard DeRose
f1eb74e22c make-test now runs doctests also; fixed several broken doctests 2008-10-17 20:50:34 -06:00
Jason Gerard DeRose
6489e4f348 Renamed gen-doc.bash, run-tests.bash to make-doc, make-test respectively 2008-10-07 22:45:32 -06:00