random-port 0.0.3__tar.gz → 0.0.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of random-port might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: random_port
3
- Version: 0.0.3
3
+ Version: 0.0.4
4
4
  Summary: Generate a free TCP or UDP random port
5
5
  Author-email: Fabrício Barros Cabral <fabriciofx@gmail.com>
6
6
  License-Expression: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "random_port"
7
- version = "0.0.3"
7
+ version = "0.0.4"
8
8
  description = "Generate a free TCP or UDP random port"
9
9
  authors = [{ name = "Fabrício Barros Cabral", email = "fabriciofx@gmail.com" }]
10
10
  readme = "README.md"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: random_port
3
- Version: 0.0.3
3
+ Version: 0.0.4
4
4
  Summary: Generate a free TCP or UDP random port
5
5
  Author-email: Fabrício Barros Cabral <fabriciofx@gmail.com>
6
6
  License-Expression: MIT
@@ -2,7 +2,7 @@ LICENSE.txt
2
2
  README.md
3
3
  pyproject.toml
4
4
  random_port/__init__.py
5
- random_port/core.py
5
+ random_port/pool.py
6
6
  random_port.egg-info/PKG-INFO
7
7
  random_port.egg-info/SOURCES.txt
8
8
  random_port.egg-info/dependency_links.txt
@@ -21,7 +21,7 @@
21
21
  # SOFTWARE.
22
22
  import socket
23
23
 
24
- from random_port.core import TcpRandomPort, UdpRandomPort
24
+ from random_port.pool import TcpRandomPort, UdpRandomPort
25
25
 
26
26
 
27
27
  def test_tcp_random_port() -> None:
@@ -47,9 +47,9 @@ def test_tcp_in_use() -> None:
47
47
  server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
48
48
  server.setblocking(False)
49
49
  server.bind((host, begin))
50
- free_port = TcpRandomPort(host, begin, end).value()
51
- assert free_port == end
50
+ port = TcpRandomPort(host, begin, end).value()
52
51
  server.close()
52
+ assert port == end
53
53
 
54
54
 
55
55
  def test_udp_in_use() -> None:
@@ -59,6 +59,6 @@ def test_udp_in_use() -> None:
59
59
  server = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
60
60
  server.setblocking(False)
61
61
  server.bind((host, begin))
62
- free_port = UdpRandomPort(host, begin, end).value()
63
- assert free_port == end
62
+ port = UdpRandomPort(host, begin, end).value()
64
63
  server.close()
64
+ assert port == end
File without changes
File without changes
File without changes