gns-deb-diff

automate the documentation of the differences between gNewSense and Debian.
git clone git://git.ricketyspace.net/gns-deb-diff.git
Log | Files | Refs

commit 70faab1b096d5ceca88bf972e918c5ee9610be89
parent 9b6c178e8f66c1132362cf56b833f62dc1f84855
Author: rsiddharth <s@ricketyspace.net>
Date:   Thu,  8 Dec 2016 03:37:56 +0000

Add `gns_wiki_header` function..

* gd_diff.py (gns_wiki_header): New functions.
* tests/test_gd_diff.py (test_gns_wiki_page): Test for
gns_wiki_header`.

Diffstat:
gd_diff.py | 7+++++++
tests/test_gd_diff.py | 6++++++
2 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/gd_diff.py b/gd_diff.py @@ -19,6 +19,7 @@ from os import path from subprocess import run, PIPE from bs4 import BeautifulSoup +from pkg_resources import resource_string _version = '0.1.0dev0' @@ -379,3 +380,9 @@ def generate_wiki_table(release): wiki_table += construct_table_row(pkg, change, reason) + '\n' return pkgs_noreadmes, wiki_table + + +def gns_wiki_header(): + """Return gNewSense wiki header.""" + header = resource_string(__name__, 'gd-diff/data/wiki-header.txt') + return header.decode() diff --git a/tests/test_gd_diff.py b/tests/test_gd_diff.py @@ -443,6 +443,12 @@ class TestGdDiff(object): assert len(pkgs) == 0 + def test_gns_wiki_header(self): + header = gns_wiki_header() + expected_header = open('gd-diff/data/wiki-header.txt', 'r').read() + assert header == expected_header + + def teardown(self): """Teardown method for this class.""" if(path.exists(self.gns_pkgs_dir)):