[Python-modules-commits] [systemfixtures] 01/03: New upstream version 0.6.1
Free Ekanayaka
freee at moszumanska.debian.org
Mon Dec 19 16:15:17 UTC 2016
This is an automated email from the git hooks/post-receive script.
freee pushed a commit to branch master
in repository systemfixtures.
commit 36e750114ab0d40309a66e7980394b06b3f467f9
Author: Free Ekanayaka <freee at debian.org>
Date: Mon Dec 19 16:06:38 2016 +0000
New upstream version 0.6.1
---
AUTHORS | 1 +
ChangeLog | 5 +++++
PKG-INFO | 2 +-
setup.cfg | 4 ++--
systemfixtures.egg-info/PKG-INFO | 2 +-
systemfixtures.egg-info/SOURCES.txt | 2 +-
systemfixtures.egg-info/pbr.json | 2 +-
.../tests/{test_executables.py => test_executable.py} | 17 ++++++++++++-----
tox.ini | 1 -
9 files changed, 24 insertions(+), 12 deletions(-)
diff --git a/AUTHORS b/AUTHORS
index a801eff..2998bc2 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -1 +1,2 @@
+Free Ekanayaka <free.ekanayaka at gmail.com>
Free Ekanayaka <free at ekanayaka.io>
diff --git a/ChangeLog b/ChangeLog
index 4228466..2f97ad8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,11 @@
CHANGES
=======
+0.6.1
+-----
+
+* Fix flakiness in FakeExecutable tests
+
0.6.0
-----
diff --git a/PKG-INFO b/PKG-INFO
index 148acba..2d5e0e4 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: systemfixtures
-Version: 0.6.0
+Version: 0.6.1
Summary: Test fixtures for providing fake versions of various system resources (processes, users, groups, etc.)
Home-page: https://github.com/freeekanayaka/systemfixtures
Author: Free Ekanayaka
diff --git a/setup.cfg b/setup.cfg
index 4a9b221..50c513d 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -33,7 +33,7 @@ all_files = 1
upload-dir = docs/_build/html
[egg_info]
-tag_svn_revision = 0
-tag_build =
tag_date = 0
+tag_build =
+tag_svn_revision = 0
diff --git a/systemfixtures.egg-info/PKG-INFO b/systemfixtures.egg-info/PKG-INFO
index 148acba..2d5e0e4 100644
--- a/systemfixtures.egg-info/PKG-INFO
+++ b/systemfixtures.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: systemfixtures
-Version: 0.6.0
+Version: 0.6.1
Summary: Test fixtures for providing fake versions of various system resources (processes, users, groups, etc.)
Home-page: https://github.com/freeekanayaka/systemfixtures
Author: Free Ekanayaka
diff --git a/systemfixtures.egg-info/SOURCES.txt b/systemfixtures.egg-info/SOURCES.txt
index 694aee9..c250fb9 100644
--- a/systemfixtures.egg-info/SOURCES.txt
+++ b/systemfixtures.egg-info/SOURCES.txt
@@ -43,7 +43,7 @@ systemfixtures/processes/tests/test_fixture.py
systemfixtures/processes/tests/test_systemctl.py
systemfixtures/processes/tests/test_wget.py
systemfixtures/tests/__init__.py
-systemfixtures/tests/test_executables.py
+systemfixtures/tests/test_executable.py
systemfixtures/tests/test_filesystem.py
systemfixtures/tests/test_groups.py
systemfixtures/tests/test_network.py
diff --git a/systemfixtures.egg-info/pbr.json b/systemfixtures.egg-info/pbr.json
index e6400fb..52e0ef9 100644
--- a/systemfixtures.egg-info/pbr.json
+++ b/systemfixtures.egg-info/pbr.json
@@ -1 +1 @@
-{"is_release": true, "git_version": "32efb5c"}
\ No newline at end of file
+{"is_release": true, "git_version": "964369c"}
\ No newline at end of file
diff --git a/systemfixtures/tests/test_executables.py b/systemfixtures/tests/test_executable.py
similarity index 73%
rename from systemfixtures/tests/test_executables.py
rename to systemfixtures/tests/test_executable.py
index 313c157..ef222cc 100644
--- a/systemfixtures/tests/test_executables.py
+++ b/systemfixtures/tests/test_executable.py
@@ -11,10 +11,10 @@ from testtools.matchers import (
from ..executable import FakeExecutable
-class FakeGroupsTest(TestCase):
+class FakeExecutableTest(TestCase):
def setUp(self):
- super(FakeGroupsTest, self).setUp()
+ super(FakeExecutableTest, self).setUp()
self.executable = self.useFixture(FakeExecutable())
def test_out(self):
@@ -28,23 +28,30 @@ class FakeGroupsTest(TestCase):
self.executable.path,
FileContains(matcher=Contains("time.sleep(1)")))
- def test_listen(self):
+ def test_listen_random(self):
self.executable.listen()
+ self.assertIsNotNone(self.executable.port)
+
+ def test_listen(self):
+ self.executable.listen(6666)
self.executable.out("hello")
process = subprocess.Popen(
- [self.executable.path], stdout=subprocess.PIPE)
+ [self.executable.path], stdout=subprocess.PIPE,
+ stderr=subprocess.STDOUT)
self.addCleanup(process.wait)
self.addCleanup(process.kill)
- # This ensure that the port will be open
+ # This ensures that the port will be open
self.assertEqual(b"hello\n", process.stdout.read(6))
sock = socket.socket()
sock.connect(("127.0.0.1", self.executable.port))
self.assertEqual("127.0.0.1", sock.getsockname()[0])
def test_hang(self):
+ self.executable.out("hello") # Used to ensure the process is running
self.executable.hang()
process = subprocess.Popen(
[self.executable.path], stdout=subprocess.PIPE)
+ self.assertEqual(b"hello\n", process.stdout.read(6))
process.terminate()
self.addCleanup(process.wait)
self.addCleanup(process.kill)
diff --git a/tox.ini b/tox.ini
index 726e86b..9cd8082 100644
--- a/tox.ini
+++ b/tox.ini
@@ -8,7 +8,6 @@ skipsdist = True
[testenv]
usedevelop = True
-sitepackages= True
install_command = pip install -U {opts} {packages}
deps = .[test]
whitelist_externals = rm
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/systemfixtures.git
More information about the Python-modules-commits
mailing list