summaryrefslogtreecommitdiff
path: root/testing/test_git.py
Commit message (Collapse)AuthorAgeFilesLines
* chore: test cleanup - drop wd.versionRonny Pfannschmidt2023-04-101-17/+17
| | | | always use the explicit get_version method
* refactor: introduce a own CompletedProcess subclass with parse_success methodRonny Pfannschmidt2023-04-051-3/+2
|
* breaking: unify version.distance to intRonny Pfannschmidt2023-04-031-4/+5
| | | | the difference between distance=0 and distance=None was hiding issues
* introduce a parse_success helper to parse command outputRonny Pfannschmidt2023-03-291-1/+3
| | | | | apply it to git also turn imports to run helpers private
* make scmworkdir.path always a PathRonny Pfannschmidt2023-03-291-4/+4
|
* remove the utils moduleRonny Pfannschmidt2023-03-291-1/+1
| | | | | move command utils to _run_cmd move data_from_mime to integration
* breaking: purge do/do_exRonny Pfannschmidt2023-03-291-3/+13
|
* refactor/breaking: move file finders to private moduleRonny Pfannschmidt2023-03-131-6/+8
|
* refactor: command running - migrate more code to itRonny Pfannschmidt2023-03-111-9/+9
|
* pre-commit updatesRonny Pfannschmidt2023-02-121-1/+1
|
* correct git workdir passover and setuptools double call inRonny Pfannschmidt2023-01-311-12/+12
|
* git tests: expect main as possible default branchRonny Pfannschmidt2023-01-171-1/+1
|
* Fix parsing .git_archival.txt for archives made from tagged commits.Darsey Litzenberger2022-10-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Given .git_archival.txt content like this: node: 3634907645428b9542cfb4fd1ceef08f14526cb8 node-date: 2022-10-13T20:38:09-06:00 describe-name: v0.0.5 ref-names: HEAD -> main, tag: v0.0.5 we would previously fail with an exception like this: $ python3 -m setuptools_scm Traceback (most recent call last): [..snip..] File ".../setuptools_scm/git.py", line 312, in parse_archival return archival_to_version(data, config=config) File ".../setuptools_scm/git.py", line 286, in archival_to_version tag, number, node, _ = _git_parse_describe(archival_describe) File ".../setuptools_scm/git.py", line 245, in _git_parse_describe tag, number, node = describe_output.rsplit("-", 2) ValueError: not enough values to unpack (expected 3, got 1) The problem is that the describe-name field is "v0.0.5" instead of looking like "v0.0.5-0-g3634907". When we invoke git-describe ourselves, we specify the --long option, but the format-strings implemented by git-archive do not currently give us any way to force long-output in a .git_archival.txt file. This change detects this condition and returns None for the missing fields.
* tests: Fix test_git_archhival_from_unfiltered assumptionsStanislav Levin2022-08-051-6/+2
| | | | | | | | | | | | | This test relied on several things: - editable installation and thereby, '.git_archival.txt' is always accessible. But some Linux distros (e.g. Debian) run tests out of a git tree. - no expansion happens for '.git_archival.txt' (see .gitattributes), i.e. the packaged sources are not produced by git archive. Fixes: https://github.com/pypa/setuptools_scm/issues/750 Signed-off-by: Stanislav Levin <slev@altlinux.org>
* ignore unexported git archivalsRonny Pfannschmidt2022-07-101-0/+12
| | | | | fixes #742 fixes #745
* fix #727: correctly handle incomplete archivals from setuptools_scm_git_archivalRonny Pfannschmidt2022-06-261-0/+8
|
* Merge pull request #731 from RonnyPfannschmidt/cli-setup-root-optionRonny Pfannschmidt2022-06-261-2/+5
|\ | | | | fix #691 - support root in pyproject.toml even for cli
| * fix #691 - support root in pyproject.toml even for cliRonny Pfannschmidt2022-06-261-2/+5
| | | | | | | | | | superseeds #702 which served as inspiration adds integration tests
* | fix #728: remove git arguments that triggered wrong branch namesRonny Pfannschmidt2022-06-251-0/+8
|/ | | | also added a test that will catch this
* merge with mainlineRonny Pfannschmidt2022-06-211-86/+136
|\
| * Bump minimal python to 3.7Ronny Pfannschmidt2022-05-291-3/+4
| |
| * complete mypy transformationRonny Pfannschmidt2022-05-291-41/+55
| |
| * harden test_version_from git and more type fixesRonny Pfannschmidt2022-05-291-42/+43
| |
| * typing fixed in face of ongoing python 3.6 supportRonny Pfannschmidt2022-05-291-4/+6
| |
| * Prepare git archival style testingRonny Pfannschmidt2022-05-291-3/+35
| |
* | Review commentsChris Burr2022-04-261-0/+1
| |
* | Add test for git directories owned by different usersChris Burr2022-04-251-0/+38
|/
* Avoid having to quote full path to GPG batch params fileXiao Di Guan2022-02-101-6/+6
|
* Pick and configure an explicit `Key-Type`Xiao Di Guan2022-02-091-1/+2
| | | | If the default `Key-Type` happens to be an ECC, then `Key-Curve` would be a required parameter, so let's just pick RSA2048 and be done with it.
* Make implicit `"help"` program argument overridable in `has_command`Xiao Di Guan2022-02-081-1/+1
|
* Add test case for #548Xiao Di Guan2022-02-081-0/+32
|
* Use timezone aware datetimeAnderson Bravalheri2022-01-171-1/+2
| | | | | | | | The official Python docs recommend explicitly passing a timezone object instead of using `utcnow` or `utcfromtimestamp`: https://docs.python.org/3/library/datetime.html#datetime.datetime.utcnow https://docs.python.org/3/library/datetime.html#datetime.datetime.utcfromtimestamp
* temporarily mark test_git_worktree_support as xfailRonny Pfannschmidt2021-09-021-2/+4
|
* apply reorder-python-importsRonny Pfannschmidt2021-08-071-5/+11
|
* Adding search_parent_directories to recursively search parent directory for ↵Tom de Geus2021-08-071-0/+13
| | | | git-root
* Use os.mkdir rather than subprocess.PopenDominic Davis-Foster2021-07-111-2/+2
|
* [pre-commit.ci] auto fixes from pre-commit.com hookspre-commit-ci[bot]2021-06-181-2/+4
| | | | for more information, see https://pre-commit.ci
* Minor tests improvementSylvain MARIE2021-06-181-1/+3
|
* [pre-commit.ci] auto fixes from pre-commit.com hookspre-commit-ci[bot]2021-06-181-2/+2
| | | | for more information, see https://pre-commit.ci
* `version_cls` can now receive a string too. Added a test for setuptools/git ↵Sylvain MARIE2021-06-181-0/+56
| | | | interaction around normalization
* Exposing `NonNormalizedVersion` at the root level now that it moved to the ↵Sylvain MARIE2021-06-181-2/+2
| | | | config package.
* Added a `normalize` boolean flag and a `NonNormalizedVersion` class. Using ↵Sylvain MARIE2021-06-181-7/+11
| | | | `normalize=False` is equivalent to setting `version_cls=NonNormalizedVersion`. Updated tests, added readme and changelog
* [pre-commit.ci] auto fixes from pre-commit.com hookspre-commit-ci[bot]2021-04-261-1/+1
| | | | for more information, see https://pre-commit.ci
* drop node_date on old gitRonny Pfannschmidt2021-03-171-1/+10
| | | | fixes #537
* fix: drop more Python 2 manuallyHenry Schreiner2021-03-161-8/+0
|
* style: run pre-commitHenry Schreiner2021-03-161-1/+1
|
* introduce internal support for walking multiple version schemes, needs ↵Ronny Pfannschmidt2021-03-121-1/+1
| | | | refinement
* add node_date for gitRonny Pfannschmidt2021-03-121-2/+19
|
* add test and changelog for #356Ronny Pfannschmidt2020-12-111-0/+2
|
* [breaking] fix #339: error when targetted scm parsing fails for missing commandRonny Pfannschmidt2020-12-061-5/+9
|