This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
blacklist: | |
- name: "*" | |
- license: "*agpl*" | |
- license: None | |
- license: "" | |
- build: "*py34*" | |
- build: "*py36*" | |
whitelist: | |
- build: "*py27*" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def pytest_terminal_summary(terminalreporter, exitstatus): | |
import os | |
if exitstatus != 0 and 'JENKINS_URL' in os.environ: | |
markup = {'yellow': True, 'bold': True} | |
terminalreporter.write_sep("=", "ENVIRONMENT", **markup) | |
for k, v in sorted(os.environ.items()): | |
if k: | |
terminalreporter.write_line('%r: %r' % (k, v), **markup) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try: | |
os.remove(filename) | |
except PermissionError as e: | |
print('THIS PID', os.getpid()) | |
import psutil | |
for proc in psutil.process_iter(): | |
try: | |
files = proc.open_files() | |
except psutil.AccessDenied: | |
continue |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import absolute_import, division, print_function, unicode_literals | |
import re | |
import subprocess | |
with open('CHANGELOG.rst') as f: | |
changelog_lines = f.readlines() | |
output = subprocess.check_output('git log --tags --simplify-by-decoration --pretty="format:%ci %d"', shell=True) | |
tags_and_dates = {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ unzip -l library.zip | |
Archive: library.zip | |
Length Date Time Name | |
--------- ---------- ----- ---- | |
0 2016-11-30 08:21 funcsigs/ | |
0 2016-11-30 08:21 funcsigs-1.0.2.dist-info/ | |
13297 2016-11-30 08:21 funcsigs-1.0.2.dist-info/DESCRIPTION.rst | |
4 2016-11-30 08:21 funcsigs-1.0.2.dist-info/INSTALLER | |
14420 2016-11-30 08:21 funcsigs-1.0.2.dist-info/METADATA | |
1294 2016-11-30 08:21 funcsigs-1.0.2.dist-info/metadata.json |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Creates a dummy tree with test files, with or without conftest.py files. | |
Usage: | |
generate_tests_tree.py 4 6 10 0 | |
Generates a tree 4 levels deep, 6 folders per level and 10 test files each, without any conftest.py files. Each | |
test file contains 10 dummy tests. | |
""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=========================== pytest-warning summary ============================ | |
WW0 in testing\acceptance_test.py:629 the following warning was recorded: | |
..\..\..\..\..\..\..\..\..\pytest\.tox\py35\lib\site-packages\_pytest\vendored_packages\pluggy.py:250: PendingDeprecationWarning: generator 'pytest_pycollect_makeitem' raised StopIteration | |
wrap_controller.send(call_outcome) | |
WW0 in testing\deprecated_test.py:62 the following warning was recorded: | |
.tox\py35\lib\site-packages\_pytest\recwarn.py:65: DeprecationWarning: use of getfuncargvalue is deprecated, use getfixturevalue | |
old_warn(message, category, *args, **kwargs) | |
WW0 in testing\test_collection.py:350 the following warning was recorded: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import absolute_import, division, print_function, unicode_literals | |
from functools import partial | |
class Hooks: | |
def pytest_about_to_timeout(self, config): | |
pass |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"%PYTHON%" setup.py install | |
if errorlevel 1 exit 1 | |
:: Add more build steps here, if they are necessary. | |
:: See | |
:: http://docs.continuum.io/conda/build.html | |
:: for a list of environment variables that are set during the build process. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
from pyftpdlib.authorizers import DummyAuthorizer | |
from pyftpdlib.handlers import FTPHandler | |
from pyftpdlib.servers import FTPServer | |
import pytest | |
@pytest.yield_fixture | |
def ftp_server(tmpdir, request): | |
authorizer = DummyAuthorizer() |