Skip to content

Commit 3929f8e

Browse files
authored
Move tests folder to root folder (#61)
1 parent 4ccfb3a commit 3929f8e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+14
-25
lines changed

.coveragerc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
branch = False
66
# branch = True
77
omit =
8-
multipart/tests/*
8+
tests/*
99

1010
[report]
1111
# Regexes for lines to exclude from consideration

.github/workflows/publish.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ name: Upload Python Package
1010

1111
on:
1212
push:
13-
tags:
13+
tags:
1414
- '[0-9]+.[0-9]+.[0-9]+.*' # Run on every git tag with semantic versioning. i.e: 1.5.0 or 1.5.0rc1
1515

1616
permissions:

MANIFEST.in

Lines changed: 0 additions & 4 deletions
This file was deleted.

multipart/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
# This is the canonical package information.
2-
__author__ = 'Andrew Dunham'
3-
__license__ = 'Apache'
2+
__author__ = "Andrew Dunham"
3+
__license__ = "Apache"
44
__copyright__ = "Copyright (c) 2012-2013, Andrew Dunham"
5-
__version__ = "0.0.6"
5+
__version__ = "0.0.6"
66

77

88
from .multipart import (
99
FormParser,
1010
MultipartParser,
11-
QuerystringParser,
1211
OctetStreamParser,
12+
QuerystringParser,
1313
create_form_parser,
1414
parse_form,
1515
)

pyproject.toml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@ description = "A streaming multipart parser for Python"
99
readme = "README.rst"
1010
license = "Apache-2.0"
1111
requires-python = ">=3.7"
12-
authors = [
13-
{ name = "Andrew Dunham", email = "andrew@du.nham.ca" },
14-
]
12+
authors = [{ name = "Andrew Dunham", email = "andrew@du.nham.ca" }]
1513
classifiers = [
1614
'Development Status :: 5 - Production/Stable',
1715
'Environment :: Web Environment',
@@ -56,10 +54,7 @@ Source = "https://github.com/andrew-d/python-multipart"
5654
path = "multipart/__init__.py"
5755

5856
[tool.hatch.build.targets.wheel]
59-
packages = [
60-
"multipart",
61-
]
57+
packages = ["multipart"]
58+
6259
[tool.hatch.build.targets.sdist]
63-
include = [
64-
"/multipart",
65-
]
60+
include = ["/multipart", "/tests"]

tasks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def test(ctx, all=False):
2828
test_cmd.append('-m "not slow_test"')
2929

3030
# Test in this directory
31-
test_cmd.append(os.path.join("multipart", "tests"))
31+
test_cmd.append("tests")
3232

3333
# Run the command.
3434
# TODO: why does this fail with pty=True?
File renamed without changes.
File renamed without changes.

multipart/tests/test_multipart.py renamed to tests/test_multipart.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import os
22
import sys
3-
import glob
43
import yaml
5-
import base64
64
import random
75
import tempfile
86
import unittest
@@ -12,9 +10,9 @@
1210
slow_test,
1311
)
1412
from io import BytesIO
15-
from unittest.mock import MagicMock, Mock, patch
13+
from unittest.mock import Mock
1614

17-
from ..multipart import *
15+
from multipart.multipart import *
1816

1917

2018
# Get the current directory for our later test cases.

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ deps=
88
pytest-timeout
99
PyYAML
1010
commands=
11-
pytest --cov-report term-missing --cov-config .coveragerc --cov multipart --timeout=30 multipart/tests
11+
pytest --cov-report term-missing --cov-config .coveragerc --cov multipart --timeout=30 tests

0 commit comments

Comments
 (0)