1 |
commit: c1e8e58a65a31c0c6241f172a7c94ec675994bcd |
2 |
Author: Michael Mair-Keimberger <m.mairkeimberger <AT> gmail <DOT> com> |
3 |
AuthorDate: Wed Sep 27 18:36:16 2017 +0000 |
4 |
Commit: Patrice Clement <monsieurp <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Sep 28 12:38:33 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c1e8e58a |
7 |
|
8 |
dev-python/envoy: remove unused file. |
9 |
|
10 |
Closes: https://github.com/gentoo/gentoo/pull/5802 |
11 |
|
12 |
dev-python/envoy/files/test_envoy.py | 52 ------------------------------------ |
13 |
1 file changed, 52 deletions(-) |
14 |
|
15 |
diff --git a/dev-python/envoy/files/test_envoy.py b/dev-python/envoy/files/test_envoy.py |
16 |
deleted file mode 100644 |
17 |
index 8c83a0816a2..00000000000 |
18 |
--- a/dev-python/envoy/files/test_envoy.py |
19 |
+++ /dev/null |
20 |
@@ -1,52 +0,0 @@ |
21 |
-import unittest |
22 |
-import envoy |
23 |
-import time |
24 |
- |
25 |
-class SimpleTest(unittest.TestCase): |
26 |
- |
27 |
- def test_input(self): |
28 |
- r = envoy.run("sed s/i/I/g", "Hi") |
29 |
- self.assertEqual(r.std_out.rstrip(), "HI") |
30 |
- self.assertEqual(r.status_code, 0) |
31 |
- |
32 |
- def test_pipe(self): |
33 |
- r = envoy.run("echo -n 'hi'| tr [:lower:] [:upper:]") |
34 |
- self.assertEqual(r.std_out, "HI") |
35 |
- self.assertEqual(r.status_code, 0) |
36 |
- |
37 |
- def test_timeout(self): |
38 |
- r = envoy.run('yes | head', timeout=1) |
39 |
- self.assertEqual(r.std_out, 'y\ny\ny\ny\ny\ny\ny\ny\ny\ny\n') |
40 |
- self.assertEqual(r.status_code, 0) |
41 |
- |
42 |
- # THIS TEST FAILS BECAUSE expand_args DOESN'T HANDLE QUOTES PROPERLY |
43 |
- def test_quoted_args(self): |
44 |
- sentinel = 'quoted_args' * 3 |
45 |
- r = envoy.run("python -c 'print \"%s\"'" % sentinel) |
46 |
- self.assertEqual(r.std_out.rstrip(), sentinel) |
47 |
- self.assertEqual(r.status_code, 0) |
48 |
- |
49 |
-class ConnectedCommandTests(unittest.TestCase): |
50 |
- |
51 |
- def test_status_code_none(self): |
52 |
- c = envoy.connect("sleep 5") |
53 |
- self.assertEqual(c.status_code, None) |
54 |
- |
55 |
- def test_status_code_success(self): |
56 |
- c = envoy.connect("sleep 1") |
57 |
- time.sleep(2) |
58 |
- self.assertEqual(c.status_code, 0) |
59 |
- |
60 |
- def test_status_code_failure(self): |
61 |
- c = envoy.connect("sleeep 1") |
62 |
- self.assertEqual(c.status_code, 127) |
63 |
- |
64 |
- def test_input(self): |
65 |
- test_string = 'asdfQWER' |
66 |
- r = envoy.connect("cat | tr [:lower:] [:upper:]") |
67 |
- r.send(test_string) |
68 |
- self.assertEqual(r.std_out, test_string.upper()) |
69 |
- self.assertEqual(r.status_code, 0) |
70 |
- |
71 |
-if __name__ == "__main__": |
72 |
- unittest.main() |