move tests

renamed:    .hgignore -> .gitignore
	new file:   .gitlab-ci.yml
	new file:   Makefile
	new file:   miniuri/tests/__init__.py
	renamed:    test_miniuri.py -> miniuri/tests/test_miniuri.py
	new file:   requirements-test.txt
	modified:   setup.py
This commit is contained in:
Russell Ballestrini 2022-07-06 14:20:55 -04:00
parent 9b4016da47
commit 143127cf7a
7 changed files with 36 additions and 7 deletions

View file

@ -1,6 +1,3 @@
# use glob syntax.
syntax: glob
*.pyc
*.swp
*.orig
@ -9,3 +6,5 @@ syntax: glob
build/*
.cache/*
.pytest_cache/*
env/*
dist/*

14
.gitlab-ci.yml Normal file
View file

@ -0,0 +1,14 @@
stages:
- test
#- build
#- deploy
test:
stage: test
tags: ["build"]
script: make test
artifacts:
paths:
- env.vanilla
expire_in: 1 hour

9
Makefile Normal file
View file

@ -0,0 +1,9 @@
env:
python3 -m venv env
. env/bin/activate
env/bin/pip install --upgrade pip
test: env
#env/bin/py.test --lf
env/bin/pip install --upgrade -r requirements-test.txt
env/bin/py.test

View file

View file

@ -1,6 +1,6 @@
from unittest import TestCase
from miniuri import Uri
from ..miniuri import Uri
class TestMiniUri(TestCase):

5
requirements-test.txt Normal file
View file

@ -0,0 +1,5 @@
# testing.
pytest
pytest-cov
nose
twine

View file

@ -4,7 +4,7 @@ from setuptools import setup, find_packages
setup(
name="miniuri",
version="1.0.8",
version="1.0.9",
long_description=open("README.rst").read(),
description="miniuri: The Universal URI Parser",
keywords="miniuri uri url parser",
@ -13,7 +13,7 @@ setup(
url="https://git.unturf.com/python/miniuri",
platforms=["All"],
license="Public Domain",
packages=find_packages(),
packages=find_packages(exclude="tests"),
include_package_data=True,
classifiers=[
# Specify the Python versions you support here. In particular, ensure
@ -37,4 +37,6 @@ setup(
# setup keyword args: http://peak.telecommunity.com/DevCenter/setuptools
# built and uploaded to pypi with this:
# python setup.py sdist bdist_egg register upload
#python setup.py sdist bdist_egg
#twine upload dist/*