Project

Profile

Help

Task #133

closed

Replace pulp.devel.test_runner with tox

Added by bmbouter about 9 years ago. Updated about 5 years ago.

Status:
CLOSED - WONTFIX
Priority:
Normal
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Platform Release:
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

Description

Motivation
This is a task to replace the ./run-tests.py modules in platform AND all plugins. Developers should be able to pass arguments to ./run-tests.py and have it pass them through to nose. We could fix that defect, or we could stop maintaining run-tests.py and use tox instead.

Requirements

  1. Remove run-tests.py in platform and all plugins
  2. Remove pulp.devel.test_runner
  3. List tox as a developer dependency somehow (I'm a little unclear on where to put this)
  4. Add a tox configuration to platform and plugins which provides the same behaviors (flake8, test selection based on OS, etc).
  5. Update the development docs accordingly.
  6. Consider if any changes need to be done to the dev setup scripts to accommodate this

Related issues

Blocks Pulp - Task #919: Add Jenkins job to ensure all tests pass independantlyCLOSED - WONTFIX

Actions
Actions #1

Updated by bmbouter about 9 years ago

  • Tags Sprint Candidate added
Actions #2

Updated by cduryee about 9 years ago

Could we replace run-tests.py with tox? I think tox is more standard.

Actions #3

Updated by bcourt about 9 years ago

+1 to using tox or some other standard framework for testrunning.

Actions #4

Updated by bmbouter about 9 years ago

+1 also for using tox or something we don't maintain ourselves.

Do we need tox, or can we just use nosetests directly? The only reason I can think of to use tox is that on some platforms we only want certain unit tests to run. Does tox give us that or can we get nosetests to do it correctly without adding another thing like tox?

Actions #5

Updated by cduryee about 9 years ago

bmbouter wrote:

+1 also for using tox or something we don't maintain ourselves.

Do we need tox, or can we just use nosetests directly? The only reason I can think of to use tox is that on some platforms we only want certain unit tests to run. Does tox give us that or can we get nosetests to do it correctly without adding another thing like tox?

Tox also lets you run flake8 etc with the options you want. An example from subscription-manager:

[pep8]
ignore=E121,E122,E123,E124,E125,E126,E127,E128,E129,E131,E265,E402,E501,E713,E714,E731
max-line-length=300
[flake8]
ignore=E121,E122,E123,E124,E125,E126,E127,E128,E129,E131,E265,E402,E501,E713,E714,E731
exclude=*certdata*,*manifestdata*
jobs=auto
max-line-length=300

I believe we'd be able to get rid of run-tests.py entirely if we can run flake8 and pep8 from tox.

Actions #6

Updated by amacdona@redhat.com about 9 years ago

+1 for tox, it will also allow us to run the tests with different versions of python on our own machines.

Actions #7

Updated by bmbouter about 9 years ago

Upstream celery uses tox to test multiple Python versions. That is awesome. I went to set up the different Python versions on my computer also, but I found it really difficult. I gave up before I got it working.

Actions #8

Updated by bmbouter about 9 years ago

  • Description updated (diff)

I rewrote the task based on the tox discussion.

One thing I'm not sure about is how to list it as a dependency. In setup.py? In the spec file as a build dep? Is tox available everywhere and what version? In the developer setup script?

Actions #9

Updated by rbarlow about 9 years ago

On 03/05/2015 09:45 AM, bmbouter wrote:> One thing I'm not sure about is
how to list it as a dependency. In

setup.py? In the spec file as a build dep? Is tox available everywhere
and what version? In the developer setup script?

It doesn't belong in setup.py or in the spec file IMO. We could still
have a run-tests.py that is just a thin wrapper around it, and if it
detects that it's missing it gives a helpful error message.

Actions #10

Updated by bmbouter about 9 years ago

  • Subject changed from Make ./run-tests.py pass through arguments to nosetests to Replace pulp.devel.test_runner with tox
  • Tags deleted (Sprint Candidate)
Actions #11

Updated by bmbouter almost 9 years ago

  • Blocks deleted (Refactor #132: Ensure all tests can be run independantly)
Actions #12

Updated by bmbouter almost 9 years ago

  • Blocks Task #919: Add Jenkins job to ensure all tests pass independantly added
Actions #13

Updated by bmbouter about 5 years ago

  • Status changed from NEW to CLOSED - WONTFIX
Actions #14

Updated by bmbouter about 5 years ago

Pulp 2 is approaching maintenance mode, and this Pulp 2 ticket is not being actively worked on. As such, it is being closed as WONTFIX. Pulp 2 is still accepting contributions though, so if you want to contribute a fix for this ticket, please reopen or comment on it. If you don't have permissions to reopen this ticket, or you want to discuss an issue, please reach out via the developer mailing list.

Actions #15

Updated by bmbouter about 5 years ago

  • Tags Pulp 2 added

Also available in: Atom PDF