[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [nyx/master] Fix installation and tests
commit 9f2881293f50e9fca60f767a36d52ee237464737
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date: Sun Aug 13 14:59:23 2017 -0700
Fix installation and tests
Oops! Could've sworn I ran our tests after our earlier changes but evidently
not. Moving our nyxrc.sample broke installation, and swapping to bytes broke
some test assertions.
---
nyx/starter.py | 2 +-
setup.py | 2 +-
test/panel/graph.py | 14 +++++++-------
3 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/nyx/starter.py b/nyx/starter.py
index 48885a6..6aa98b7 100644
--- a/nyx/starter.py
+++ b/nyx/starter.py
@@ -23,7 +23,7 @@ import stem
import stem.util.log
import stem.util.system
-from nyx import log, init_controller, uses_settings, nyx_interface
+from nyx import init_controller, uses_settings, nyx_interface
DEBUG_HEADER = """
Nyx {nyx_version} Debug Dump
diff --git a/setup.py b/setup.py
index f47f915..d463c2a 100644
--- a/setup.py
+++ b/setup.py
@@ -44,7 +44,7 @@ class NyxInstaller(install):
self.install_bin_script('run_nyx', os.path.join(self.install_scripts, 'nyx'))
self.install_file('man page', 'nyx.1', self.man_page)
- self.install_file('web/nyxrc sample', 'nyxrc.sample', self.sample_path)
+ self.install_file('nyxrc sample', os.path.join('web', 'nyxrc.sample'), self.sample_path)
def install_bin_script(self, source, dest):
# Install our bin script. We do this ourselves rather than with the setup()
diff --git a/test/panel/graph.py b/test/panel/graph.py
index 1420a00..99139e4 100644
--- a/test/panel/graph.py
+++ b/test/panel/graph.py
@@ -16,26 +16,26 @@ from mock import patch
EXPECTED_BLANK_GRAPH = """
Download:
-0 b
+0 B
-0 b
+0 B
5s 10 15
""".rstrip()
EXPECTED_ACCOUNTING = """
Accounting (awake) Time to reset: 01:02
- 37.7 Kb / 842.0 Kb 16.0 Kb / 74.1 Kb
+ 4.7 KB / 105.2 KB 2.0 KB / 9.2 KB
""".strip()
EXPECTED_GRAPH = """
Download:
-5 Kb *
+6 KB *
*
-2 Kb ** *
+3 KB ** *
* ****
-0 b *********
+0 B *********
5s 10 15
""".rstrip()
@@ -103,7 +103,7 @@ class TestGraphPanel(unittest.TestCase):
@require_curses
@patch('nyx.panel.graph.tor_controller')
def test_draw_subgraph(self, tor_controller_mock):
- tor_controller_mock().get_info.return_value = '543,543 421,421 551,551 710,710 200,200 175,175 188,188 250,250 377,377'
+ tor_controller_mock().get_info.return_value = '5430,5430 4210,4210 5510,5510 7100,7100 2000,2000 1750,1750 1880,1880 2500,2500 3770,3770'
data = nyx.panel.graph.BandwidthStats()
rendered = test.render(nyx.panel.graph._draw_subgraph, data.primary, 0, 30, 7, nyx.panel.graph.Bounds.LOCAL_MAX, nyx.panel.graph.Interval.EACH_SECOND, nyx.curses.Color.CYAN, '*')
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits