Opened 7 years ago

Closed 5 years ago

Last modified 5 years ago

#7826 enhancement closed fixed (fixed)

Remove test infrastructure that is relevant to only Python 2.6 and earlier

Reported by: hawkowl Owned by: Amber Brown (HawkOwl) <hawkowl@…>
Priority: normal Milestone: EndOfLifePython2.6
Component: trial Keywords:
Cc: Jonathan Lange Branch: py26-tests-7826
branch-diff, diff-cov, branch-cov, buildbot
Author: hawkowl

Description (last modified by hawkowl)

TestPyUnitResult.test_skip26 is only required on Python 2.6 because twisted.trial._synctest.SkipTest needs to make up for lack of skipping in 2.6 unittest

Change History (16)

comment:1 Changed 7 years ago by DefaultCC Plugin

Cc: Jonathan Lange added

comment:2 Changed 7 years ago by hawkowl

Description: modified (diff)
Summary: Remove twisted.trial.test.test_pyunitcompat tests that are relevant to only Python 2.6Remove twisted.trial.test.test_pyunitcompat tests + twisted.trial._synctest.SkipTest functionality that are relevant to only Python 2.6

comment:3 Changed 6 years ago by hawkowl

Author: hawkowl
Branch: branches/py26-skiptest-7826

(In [45828]) Branching to py26-skiptest-7826.

comment:4 Changed 6 years ago by hawkowl

Keywords: review added

Builds are looking good. Please review.

comment:5 Changed 6 years ago by Adi Roiban

Keywords: review removed
Owner: set to hawkowl

Thanks for the cleanup.


It looks like this patch is also introducing a deprecation.... is it ok to merge only as a .misc?

Maybe we need a separate ticket for the deprecation.


Some linters are failing.

twisted.trial.unittest.SynchronousTestCase._getSkipReason: invalid ref to unittest.SkipTest

twisted/trial/test/test_reporter.py:16: 'getmro' imported but unused


This looks like a majore error... I run the builder again in builds/164 and I got the same error.

https://buildbot.twistedmatrix.com/builders/ubuntu12.04-py2.7/builds/160

/usr/lib/python2.7/dist-packages/zope/__init__.py:3: UserWarning: Module twisted was already imported from /home/buildslave/run/ubuntu12.04-py2.7/Twisted/twisted/__init__.py, but /home/buildslave/.local/lib/python2.7/site-packages is being added to sys.path
  import pkg_resources
Traceback (most recent call last):
  File "./bin/trial", line 21, in <module>
    from twisted.scripts.trial import run
  File "/home/buildslave/run/ubuntu12.04-py2.7/Twisted/twisted/scripts/trial.py", line 23, in <module>
    from twisted.trial import runner, itrial, reporter
  File "/home/buildslave/run/ubuntu12.04-py2.7/Twisted/twisted/trial/runner.py", line 36, in <module>
    from twisted.trial import util, unittest
  File "/home/buildslave/run/ubuntu12.04-py2.7/Twisted/twisted/trial/unittest.py", line 16, in <module>
    from twisted.trial._asyncrunner import (
  File "/home/buildslave/run/ubuntu12.04-py2.7/Twisted/twisted/trial/_asyncrunner.py", line 16, in <module>
    from twisted.trial import itrial, reporter
  File "/home/buildslave/run/ubuntu12.04-py2.7/Twisted/twisted/trial/reporter.py", line 35, in <module>
    if subunit.__version__ < (1, 0):
AttributeError: 'module' object has no attribute '__version__'

Please check the errors and resubmit.

Thanks!

comment:6 Changed 5 years ago by Craig Rodrigues

Keywords: review added

Since I have been looking through the codebase, I noticed some test infrastructure relevant to Python <= 2.6, so it probably could be removed.

See:

https://github.com/twisted/twisted/pull/140

comment:7 Changed 5 years ago by Adi Roiban

Branch: branches/py26-skiptest-7826py26-skiptest-7826

comment:8 Changed 5 years ago by Adi Roiban

Keywords: review removed
Owner: changed from hawkowl to Craig Rodrigues

Thanks for the patch.

I don't know what is the scope of your PR.

This ticket description talks about TestPyUnitResult.test_skip26 and about pyunit integration.

In your PR I don't see any changes related to pyunit.

I think that you will to update the description of your PR or create a new ticket in twisted as I don't know how your PR is related to this ticket.

Thanks!

comment:9 Changed 5 years ago by Craig Rodrigues

Keywords: review added
Owner: changed from Craig Rodrigues to Adi Roiban
Summary: Remove twisted.trial.test.test_pyunitcompat tests + twisted.trial._synctest.SkipTest functionality that are relevant to only Python 2.6Remove test infrastructure that is relevant to only Python 2.6 and earlier

I have changed the title of this ticket to reflect the changes.

comment:10 Changed 5 years ago by Adi Roiban

Owner: Adi Roiban deleted

I have not seen any comments from Amber. The initial ticket was about pyunit and Amber's branch was a work related to pyunit.

I have not see any comments about why the pyunit related work should be droped.

I have not see any comment about why your branch should not have a separate ticket.

Without any feedback from Amber, I feel like this ticket was hijacked :)

I am leaving this for other to review, as I don't know what is going on here.

comment:11 Changed 5 years ago by hawkowl

Pyunit was an earlier name for unittest, hence why I tried to remove it; it doesn't really make sense in the scope of the ticket, that was me just doing random work :)

comment:12 Changed 5 years ago by hawkowl

Branch: py26-skiptest-7826py26-tests-7826

comment:13 Changed 5 years ago by Amber Brown (HawkOwl) <hawkowl@…>

Owner: set to Amber Brown (HawkOwl) <hawkowl@…>
Resolution: fixed
Status: newclosed

In ab2b350:

Error: Processor CommitTicketReference failed
 does not appear to be a Git repository. See the log for more information.

comment:14 Changed 5 years ago by Amber Brown (HawkOwl) <hawkowl@…>

In 43d1996:

Error: Processor CommitTicketReference failed
 does not appear to be a Git repository. See the log for more information.

comment:15 Changed 5 years ago by Amber Brown (HawkOwl) <hawkowl@…>

In 8706585:

Error: Processor CommitTicketReference failed
 does not appear to be a Git repository. See the log for more information.

comment:16 Changed 5 years ago by hawkowl

Keywords: review removed

[mass edit] Removing review from closed tickets.

Note: See TracTickets for help on using tickets.