Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Tidying up, and replace nose with pytest#1289

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Yobmod merged 18 commits intomainfrompytest
Jul 13, 2021
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
Show all changes
18 commits
Select commitHold shift + click to select a range
a1b7634
Add files via upload
YobmodJul 12, 2021
fefda8c
Add files via upload
YobmodJul 12, 2021
ec36580
Update test-requirements.txt
YobmodJul 12, 2021
d77b3c0
Update test_pytest.yml
YobmodJul 12, 2021
185d847
Update and rename test_pytest.yml to Future.yml
YobmodJul 12, 2021
882f2a5
Delete Future.yml
YobmodJul 12, 2021
bc48d75
Update pythonpackage.yml
YobmodJul 12, 2021
4f9ef1f
Update dev-requirements.txt
YobmodJul 12, 2021
89d7611
Update tox.ini
YobmodJul 12, 2021
6460db1
Update setup.py
YobmodJul 12, 2021
07f5680
Rename dev-requirements.txt to requirements-dev.txt
YobmodJul 12, 2021
37c7121
Update pythonpackage.yml
YobmodJul 12, 2021
3b9b153
Update test-requirements.txt
YobmodJul 12, 2021
210712f
Merge branch 'main' into pytest
YobmodJul 12, 2021
dfce27f
Update pythonpackage.yml
YobmodJul 12, 2021
a8e01c1
Add pytests args
YobmodJul 12, 2021
907aae8
Update pythonpackage.yml
YobmodJul 12, 2021
3ef208c
Update pythonpackage.yml
YobmodJul 12, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 28 additions & 10 deletions.github/workflows/pythonpackage.yml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -15,48 +15,66 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]
python-version: [3.6, 3.7, 3.8, 3.9, "3.10.0-beta.3"]

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 9999
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies and prepare tests
run: |
set -x
python -m pip install --upgrade pip
python -m pip install --upgrade pip setuptools wheel
python --version; git --version
git submodule update --init --recursive
git fetch --tags


pip install -r requirements.txt
pip install -r test-requirements.txt
TRAVIS=yes ./init-tests-after-clone.sh

git config --global user.email "travis@ci.com"
git config --global user.name "Travis Runner"
# If we rewrite the user's config by accident, we will mess it up
# and cause subsequent tests to fail
cat test/fixtures/.gitconfig >> ~/.gitconfig

- name: Lint with flake8

run: |
set -x
pip install flake8
# stop the build if there are Python syntax errors or undefined names
flake8 --ignore=W293,E265,E266,W503,W504,E731 --count --show-source --statistics
flake8 --ignore=W293,E265,E266,W503,W504,E704,E731 --count --show-source --statistics

- name: Check types with mypy
run: |
set -x
pip install tox
tox -e type
pip install mypy
mypy -p git

- name: Test with pytest
run: |
set -x
pip install -r requirements-dev.txt
pytest --cov --cov-report=term
# pytest settings in tox.ini[pytest]
continue-on-error: false

- name: Documentation
run: |
set -x
pip install -r doc/requirements.txt
make -C doc html

# - name: Test with nose
# run: |
# set -x
# pip install nose
# nosetests -v --with-coverage
# continue-on-error: false


7 changes: 7 additions & 0 deletionsrequirements-dev.txt
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
-r requirements.txt
-r test-requirements.txt

pytest
pytest-cov
pytest-sugar
pytest-icdiff
6 changes: 2 additions & 4 deletionssetup.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
#!/usr/bin/env python
from __future__ import print_function
try:
from setuptools import setup, find_packages
except ImportError:
from ez_setup import use_setuptools
from ez_setup import use_setuptools # type: ignore[Pylance]
use_setuptools()
from setuptools import setup, find_packages

fromdistutils.command.build_py import build_py as _build_py
fromsetuptools.command.build_py import build_py as _build_py
from setuptools.command.sdist import sdist as _sdist
import fnmatch
import os
Expand DownExpand Up@@ -95,7 +94,6 @@ def build_py_modules(basedir, excludes=[]):
license="BSD",
url="https://github.com/gitpython-developers/GitPython",
packages=find_packages(exclude=("test.*")),
# package_data={'git': ['**/*.pyi', 'py.typed']},
include_package_data=True,
py_modules=build_py_modules("./git", excludes=["git.ext.*"]),
package_dir={'git': 'git'},
Expand Down
4 changes: 3 additions & 1 deletiontest-requirements.txt
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,6 +3,8 @@ coverage
flake8
tox
virtualenv
nose
pytest
pytest-cov
pytest-sugar
gitdb>=4.0.1,<5
typing-extensions>=3.7.4.3;python_version<"3.10"
28 changes: 26 additions & 2 deletionstox.ini
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,7 +12,7 @@ commands = coverage run --omit="git/test/*" -m unittest --buffer {posargs}
coverage report

[testenv:flake8]
commands = flake8 --ignore=W293,E265,E266,W503,W504,E731 {posargs}
commands = flake8 --ignore=W293,E265,E266,W503,W504,E704,E731 {posargs}

[testenv:type]
description = type check ourselves
Expand All@@ -32,6 +32,30 @@ commands = {posargs}
# E731 = do not assign a lambda expression, use a def
# W293 = Blank line contains whitespace
# W504 = Line break after operator
ignore = E265,W293,E266,E731, W504
# E707 = multiple statements in one line - used for @overloads
ignore = E265,W293,E266,E731,E704, W504
max-line-length = 120
exclude = .tox,.venv,build,dist,doc,git/ext/

[pytest]
python_files =
test_*.py

# space seperated list of paths from root e.g test tests doc/testing
testpaths = test

# --cov coverage
# --cov-report term # send report to terminal term-missing -> terminal with line numbers html xml
# --cov-report term-missing # to terminal with line numbers
# --cov-report html:path # html file at path
# --maxfail # number of errors before giving up
# -disable-warnings # Disable pytest warnings (not codebase warnings)
#-rf # increased reporting of failures
# -rE # increased reporting of errors
# --ignore-glob=**/gitdb/* # ignore glob paths
addopts = --cov=git --cov-report=term --maxfail=50 -rf --verbosity=0 --disable-warnings

# ignore::WarningType # ignores those warnings
# error # turn any unignored warning into errors
filterwarnings =
ignore::DeprecationWarning

[8]ページ先頭

©2009-2026 Movatter.jp