[tor-commits] [nyx/master] Account for current version in about dialog test

atagar at torproject.org atagar at torproject.org
Sat Nov 11 22:13:21 UTC 2017


commit 1a762e806873fad863b7d7914b99b66f2ef17111
Author: Damian Johnson <atagar at torproject.org>
Date:   Thu Nov 9 10:46:56 2017 -0800

    Account for current version in about dialog test
    
    When we bump our version our about dialog rightfully changes. Revising our test
    not to expect a hardcoded version.
---
 test/popups.py | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/test/popups.py b/test/popups.py
index 6aabff4..a97e83b 100644
--- a/test/popups.py
+++ b/test/popups.py
@@ -5,6 +5,7 @@ Unit tests for nyx.popups.
 import curses
 import unittest
 
+import nyx
 import nyx.curses
 import nyx.panel
 import nyx.popups
@@ -30,17 +31,19 @@ Page 1 Commands:---------------------------------------------------------------+
 +------------------------------------------------------------------------------+
 """.strip()
 
-EXPECTED_ABOUT_POPUP = """
+VERSION_LINE = "Nyx, version %s (released %s)" % (nyx.__version__, nyx.__release_date__)
+
+EXPECTED_ABOUT_POPUP = ("""
 About:-------------------------------------------------------------------------+
-| Nyx, version 1.4.6-dev (released April 28, 2011)                             |
+| %-77s|
 |   Written by Damian Johnson (atagar at torproject.org)                          |
-|   Project page: http://www.atagar.com/arm/                                   |
+|   Project page: https://nyx.torproject.org/                                  |
 |                                                                              |
 | Released under the GPL v3 (http://www.gnu.org/licenses/gpl.html)             |
 |                                                                              |
 | Press any key...                                                             |
 +------------------------------------------------------------------------------+
-""".strip()
+""" % VERSION_LINE).strip()
 
 EXPECTED_EMPTY_COUNTS = """
 Client Locales---------------------------------------+





More information about the tor-commits mailing list