Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace the concept of mark/keyword expressions with something solid/matching #6177

Closed
RonnyPfannschmidt opened this issue Nov 13, 2019 · 1 comment
Labels
status: help wanted developers would like help from experts on this topic topic: selection related to test selection from the command line type: enhancement new feature or API change, should be merged into features branch

Comments

@RonnyPfannschmidt
Copy link
Member

follow-up to #5881

the fact that pytest -k "(lambda: locals)()()['test_method[True]'] or test_other"
is a "reasonable" workaround with the current system is pretty indicative how bad it actually is

unfortunately its not clear what language would be a good fit for filtering/selection
lets put some examples into this issue, ideally wee could use something similar to jpath/xpath jq

@RonnyPfannschmidt RonnyPfannschmidt added type: enhancement new feature or API change, should be merged into features branch status: needs information reporter needs to provide more information; can be closed after 2 or more weeks of inactivity labels Nov 13, 2019
@blueyed blueyed closed this as completed Nov 27, 2019
uqs pushed a commit to freebsd/freebsd-ports that referenced this issue Jan 13, 2020
This package installs its 'tests' module into a non-package-specific
location in the root site-packages directory. Python packages should/usually
address this by excluding tests from installation using
setup.py: find_packages(exclude[ "<package-glob>" ]).

Unfortunately the above 'simple' change cannot be used because it doesn't
allow the package to be tested on Python 3.x, as the tests package is not
processed by 2to3, and the tests need to be run on the processed (by 2to3)
sources. This may be the original reason upstream didn't remove them from
the build, not grokking the ramifications.

Accordingly, this change moves the tests into the main package namespace
and runs the tests on the processed sources in the resulting build/*
directory. Remove CONFLICTS_INSTALL (to py-suds) accordingly.

While I'm here:

Patch the tests to support pytest > 4 and hack around the
inability to reference parametrized tests (test[foo]) in pytests -k
expressions. [1][2]

Level up ports compliance: LICENSE_FILE, USE{S} ordering, match COMMENT
to setup.py:description, match pkg-descr WWW URL to setup.py:homepage

QA: All tests pass on Python 2.7-3.8

[1] pytest-dev/pytest#5881
[2] pytest-dev/pytest#6177

PR:		226077
Reported by:	yuri [1]
Approved by:	portmgr (blanket: ports compliance)
MFH:		2020Q1 (blanket: ports compliance, port bugfixes)


git-svn-id: svn+ssh://svn.freebsd.org/ports/head@522860 35697150-7ecd-e111-bb59-0022644237b5
uqs pushed a commit to freebsd/freebsd-ports that referenced this issue Jan 13, 2020
This package installs its 'tests' module into a non-package-specific
location in the root site-packages directory. Python packages should/usually
address this by excluding tests from installation using
setup.py: find_packages(exclude[ "<package-glob>" ]).

Unfortunately the above 'simple' change cannot be used because it doesn't
allow the package to be tested on Python 3.x, as the tests package is not
processed by 2to3, and the tests need to be run on the processed (by 2to3)
sources. This may be the original reason upstream didn't remove them from
the build, not grokking the ramifications.

Accordingly, this change moves the tests into the main package namespace
and runs the tests on the processed sources in the resulting build/*
directory. Remove CONFLICTS_INSTALL (to py-suds) accordingly.

While I'm here:

Patch the tests to support pytest > 4 and hack around the
inability to reference parametrized tests (test[foo]) in pytests -k
expressions. [1][2]

Level up ports compliance: LICENSE_FILE, USE{S} ordering, match COMMENT
to setup.py:description, match pkg-descr WWW URL to setup.py:homepage

QA: All tests pass on Python 2.7-3.8

[1] pytest-dev/pytest#5881
[2] pytest-dev/pytest#6177

PR:		226077
Reported by:	yuri [1]
Approved by:	portmgr (blanket: ports compliance)
MFH:		2020Q1 (blanket: ports compliance, port bugfixes)
uqs pushed a commit to freebsd/freebsd-ports that referenced this issue Jan 13, 2020
net/py-suds-jurko: Fix tests installed into shared location [1]

This package installs its 'tests' module into a non-package-specific
location in the root site-packages directory. Python packages should/usually
address this by excluding tests from installation using
setup.py: find_packages(exclude[ "<package-glob>" ]).

Unfortunately the above 'simple' change cannot be used because it doesn't
allow the package to be tested on Python 3.x, as the tests package is not
processed by 2to3, and the tests need to be run on the processed (by 2to3)
sources. This may be the original reason upstream didn't remove them from
the build, not grokking the ramifications.

Accordingly, this change moves the tests into the main package namespace
and runs the tests on the processed sources in the resulting build/*
directory. Remove CONFLICTS_INSTALL (to py-suds) accordingly.

While I'm here:

Patch the tests to support pytest > 4 and hack around the
inability to reference parametrized tests (test[foo]) in pytests -k
expressions. [1][2]

Level up ports compliance: LICENSE_FILE, USE{S} ordering, match COMMENT
to setup.py:description, match pkg-descr WWW URL to setup.py:homepage

QA: All tests pass on Python 2.7-3.8

[1] pytest-dev/pytest#5881
[2] pytest-dev/pytest#6177

PR:		226077
Reported by:	yuri [1]
Approved by:	portmgr (blanket: ports compliance)

net/py-suds-jurko: Bump PORTREVISION missed in ports r522860

PR:	226077

Approved by:	ports-secteam (blanket(s): ports compliance, port bugfixes)
Jehops pushed a commit to Jehops/freebsd-ports-legacy that referenced this issue Jan 13, 2020
This package installs its 'tests' module into a non-package-specific
location in the root site-packages directory. Python packages should/usually
address this by excluding tests from installation using
setup.py: find_packages(exclude[ "<package-glob>" ]).

Unfortunately the above 'simple' change cannot be used because it doesn't
allow the package to be tested on Python 3.x, as the tests package is not
processed by 2to3, and the tests need to be run on the processed (by 2to3)
sources. This may be the original reason upstream didn't remove them from
the build, not grokking the ramifications.

Accordingly, this change moves the tests into the main package namespace
and runs the tests on the processed sources in the resulting build/*
directory. Remove CONFLICTS_INSTALL (to py-suds) accordingly.

While I'm here:

Patch the tests to support pytest > 4 and hack around the
inability to reference parametrized tests (test[foo]) in pytests -k
expressions. [1][2]

Level up ports compliance: LICENSE_FILE, USE{S} ordering, match COMMENT
to setup.py:description, match pkg-descr WWW URL to setup.py:homepage

QA: All tests pass on Python 2.7-3.8

[1] pytest-dev/pytest#5881
[2] pytest-dev/pytest#6177

PR:		226077
Reported by:	yuri [1]
Approved by:	portmgr (blanket: ports compliance)
MFH:		2020Q1 (blanket: ports compliance, port bugfixes)


git-svn-id: svn+ssh://svn.freebsd.org/ports/head@522860 35697150-7ecd-e111-bb59-0022644237b5
@Zac-HD Zac-HD added status: help wanted developers would like help from experts on this topic topic: selection related to test selection from the command line and removed status: needs information reporter needs to provide more information; can be closed after 2 or more weeks of inactivity labels Jun 9, 2020
uqs pushed a commit to freebsd/freebsd-ports that referenced this issue Apr 1, 2021
net/py-suds-jurko: Fix tests installed into shared location [1]

This package installs its 'tests' module into a non-package-specific
location in the root site-packages directory. Python packages should/usually
address this by excluding tests from installation using
setup.py: find_packages(exclude[ "<package-glob>" ]).

Unfortunately the above 'simple' change cannot be used because it doesn't
allow the package to be tested on Python 3.x, as the tests package is not
processed by 2to3, and the tests need to be run on the processed (by 2to3)
sources. This may be the original reason upstream didn't remove them from
the build, not grokking the ramifications.

Accordingly, this change moves the tests into the main package namespace
and runs the tests on the processed sources in the resulting build/*
directory. Remove CONFLICTS_INSTALL (to py-suds) accordingly.

While I'm here:

Patch the tests to support pytest > 4 and hack around the
inability to reference parametrized tests (test[foo]) in pytests -k
expressions. [1][2]

Level up ports compliance: LICENSE_FILE, USE{S} ordering, match COMMENT
to setup.py:description, match pkg-descr WWW URL to setup.py:homepage

QA: All tests pass on Python 2.7-3.8

[1] pytest-dev/pytest#5881
[2] pytest-dev/pytest#6177

PR:		226077
Reported by:	yuri [1]
Approved by:	portmgr (blanket: ports compliance)

net/py-suds-jurko: Bump PORTREVISION missed in ports r522860

PR:	226077

Approved by:	ports-secteam (blanket(s): ports compliance, port bugfixes)
@RonnyPfannschmidt
Copy link
Member Author

closing as solved by #7122

@RonnyPfannschmidt RonnyPfannschmidt closed this as not planned Won't fix, can't repro, duplicate, stale Jan 8, 2024
svmhdvn pushed a commit to svmhdvn/freebsd-ports that referenced this issue Jan 10, 2024
This package installs its 'tests' module into a non-package-specific
location in the root site-packages directory. Python packages should/usually
address this by excluding tests from installation using
setup.py: find_packages(exclude[ "<package-glob>" ]).

Unfortunately the above 'simple' change cannot be used because it doesn't
allow the package to be tested on Python 3.x, as the tests package is not
processed by 2to3, and the tests need to be run on the processed (by 2to3)
sources. This may be the original reason upstream didn't remove them from
the build, not grokking the ramifications.

Accordingly, this change moves the tests into the main package namespace
and runs the tests on the processed sources in the resulting build/*
directory. Remove CONFLICTS_INSTALL (to py-suds) accordingly.

While I'm here:

Patch the tests to support pytest > 4 and hack around the
inability to reference parametrized tests (test[foo]) in pytests -k
expressions. [1][2]

Level up ports compliance: LICENSE_FILE, USE{S} ordering, match COMMENT
to setup.py:description, match pkg-descr WWW URL to setup.py:homepage

QA: All tests pass on Python 2.7-3.8

[1] pytest-dev/pytest#5881
[2] pytest-dev/pytest#6177

PR:		226077
Reported by:	yuri [1]
Approved by:	portmgr (blanket: ports compliance)
MFH:		2020Q1 (blanket: ports compliance, port bugfixes)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: help wanted developers would like help from experts on this topic topic: selection related to test selection from the command line type: enhancement new feature or API change, should be merged into features branch
Projects
None yet
Development

No branches or pull requests

3 participants