1 new commit in pytest:
https://bitbucket.org/hpk42/pytest/commits/bc2cf073d49b/
Changeset: bc2cf073d49b
Branch: copy-in-cache
User: RonnyPfannschmidt
Date: 2015-02-16 08:59:45+00:00
Summary: delete unused file
Affected #: 1 file
diff -r 19dff8006bd65f02f199c1e3ecec2a0a94a820b3 -r
bc2cf073d49b5eaa8a403c2e1409e98f450d2ea5 _pytest/plugin.py
--- a/_pytest/plugin.py
+++ /dev/null
@@ -1,85 +0,0 @@
-import py
-import pytest
-
-
-def pytest_addoption(parser):
- group = parser.getgroup("general")
- group.addoption(
- '--lf', action='store_true', dest="lf",
- help="rerun only the tests that failed at the last run (or all if none
failed)")
- group.addoption(
- '--ff', action='store_true', dest="failedfirst",
- help="run all tests but run the last failures first. This may
re-order "
- "tests and thus lead to repeated fixture setup/teardown")
- group.addoption(
- '--cache', action='store_true', dest="showcache",
- help="show cache contents, don't perform collection or tests")
- group.addoption(
- '--clearcache', action='store_true', dest="clearcache",
- help="remove all cache contents at start of test run.")
- group.addoption(
- '--looponchange', action='store_true', dest='looponchange',
- help='rerun every time the workdir changes')
- group.addoption(
- '--looponfail', action='store_true', dest='looponfail',
- help='rerun every time the workdir changes')
- parser.addini(
- "looponchangeroots", type="pathlist",
- help="directories to check for changes", default=[py.path.local()])
-
-
-def pytest_cmdline_main(config):
- if config.option.showcache:
- from _pytest.main import wrap_session
- return wrap_session(config, showcache)
- if config.option.looponchange or config.option.looponfail:
- from .onchange import looponchange
- return looponchange(config)
-
-
[email protected]
-def pytest_configure(config):
- from .cache import Cache
- from .lastfail import LFPlugin
- config.cache = cache = Cache(config)
- config.pluginmanager.register(LFPlugin(config), "lfplugin")
-
-def pytest_report_header(config):
- if config.option.verbose:
- relpath = py.path.local().bestrelpath(config.cache._cachedir)
- return "cachedir: %s" % config.cache._cachedir
-
-def showcache(config, session):
- from pprint import pprint
- tw = py.io.TerminalWriter()
- tw.line("cachedir: " + str(config.cache._cachedir))
- if not config.cache._cachedir.check():
- tw.line("cache is empty")
- return 0
- dummy = object()
- basedir = config.cache._cachedir
- vdir = basedir.join("v")
- tw.sep("-", "cache values")
- for valpath in vdir.visit(lambda x: x.check(file=1)):
- key = valpath.relto(vdir).replace(valpath.sep, "/")
- val = config.cache.get(key, dummy)
- if val is dummy:
- tw.line("%s contains unreadable content, "
- "will be ignored" % key)
- else:
- tw.line("%s contains:" % key)
- stream = py.io.TextIO()
- pprint(val, stream=stream)
- for line in stream.getvalue().splitlines():
- tw.line(" " + line)
-
- ddir = basedir.join("d")
- if ddir.check(dir=1) and ddir.listdir():
- tw.sep("-", "cache directories")
- for p in basedir.join("d").visit():
- #if p.check(dir=1):
- # print("%s/" % p.relto(basedir))
- if p.check(file=1):
- key = p.relto(basedir)
- tw.line("%s is a file of length %d" % (
- key, p.size()))
Repository URL: https://bitbucket.org/hpk42/pytest/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
_______________________________________________
pytest-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pytest-commit