Skip to content

Commit 3f1a5a7

Browse files
authored
Relocate tests to tests directory (#527)
1 parent 14542bd commit 3f1a5a7

6 files changed

Lines changed: 29 additions & 5 deletions

File tree

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ mypy:
3939
mypy examples/*.py zeroconf/*.py
4040

4141
test:
42-
pytest -v zeroconf/test.py zeroconf/test_aio.py zeroconf/test_asyncio.py
42+
pytest -v tests
4343

4444
test_coverage:
45-
pytest -v --cov=zeroconf --cov-branch --cov-report html --cov-report term-missing zeroconf/test.py zeroconf/test_aio.py zeroconf/test_asyncio.py
45+
pytest -v --cov=zeroconf --cov-branch --cov-report html --cov-report term-missing tests
4646

4747
autopep8:
4848
autopep8 --max-line-length=$(MAX_LINE_LENGTH) -i setup.py examples zeroconf

setup.cfg

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
[tool:pytest]
2+
testpaths = tests
3+
14
[flake8]
25
show-source = 1
36
application-import-names=zeroconf

tests/__init__.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
""" Multicast DNS Service Discovery for Python, v0.14-wmcbrine
2+
Copyright 2003 Paul Scott-Murphy, 2014 William McBrine
3+
4+
This module provides a framework for the use of DNS Service Discovery
5+
using IP multicast.
6+
7+
This library is free software; you can redistribute it and/or
8+
modify it under the terms of the GNU Lesser General Public
9+
License as published by the Free Software Foundation; either
10+
version 2.1 of the License, or (at your option) any later version.
11+
12+
This library is distributed in the hope that it will be useful,
13+
but WITHOUT ANY WARRANTY; without even the implied warranty of
14+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15+
Lesser General Public License for more details.
16+
17+
You should have received a copy of the GNU Lesser General Public
18+
License along with this library; if not, write to the Free Software
19+
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
20+
USA
21+
"""
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
import pytest
1212

13-
from . import (
13+
from zeroconf import (
1414
BadTypeInNameException,
1515
NonUniqueNameException,
1616
ServiceInfo,
@@ -20,7 +20,7 @@
2020
_LISTENER_TIME,
2121
current_time_millis,
2222
)
23-
from .aio import AsyncServiceInfo, AsyncServiceListener, AsyncZeroconf
23+
from zeroconf.aio import AsyncServiceInfo, AsyncServiceListener, AsyncZeroconf
2424

2525

2626
@pytest.mark.asyncio
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import pytest
99

10-
from .asyncio import AsyncZeroconf
10+
from zeroconf.asyncio import AsyncZeroconf
1111

1212

1313
@pytest.mark.asyncio
File renamed without changes.

0 commit comments

Comments
 (0)