Project

Profile

Help

Task #133

Replace pulp.devel.test_runner with tox

Added by bmbouter over 5 years ago. Updated over 1 year 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

<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>

History

#1 Updated by bmbouter over 5 years ago

  • Tags Sprint Candidate added

#2 Updated by cduryee over 5 years ago

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

#3 Updated by bcourt over 5 years ago

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

#4 Updated by bmbouter over 5 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?

#5 Updated by cduryee over 5 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.

#6 Updated by amacdona@redhat.com over 5 years ago

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

#7 Updated by bmbouter over 5 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.

#8 Updated by bmbouter over 5 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?

#9 Updated by rbarlow over 5 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.

#10 Updated by bmbouter over 5 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)

#11 Updated by bmbouter over 5 years ago

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

#12 Updated by bmbouter over 5 years ago

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

#13 Updated by bmbouter over 1 year ago

  • Status changed from NEW to CLOSED - WONTFIX

#14 Updated by bmbouter over 1 year 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.

#15 Updated by bmbouter over 1 year ago

  • Tags Pulp 2 added

Please register to edit this issue

Also available in: Atom PDF