mirror of
https://github.com/kennethreitz-archive/sphinx-to-github.git
synced 2026-06-05 23:40:17 +00:00
35 lines
904 B
Python
35 lines
904 B
Python
|
|
import unittest
|
|
|
|
import sphinxtogithub
|
|
|
|
class TestReplacer(unittest.TestCase):
|
|
|
|
before = """
|
|
<title>Breathe's documentation — BreatheExample v0.0.1 documentation</title>
|
|
<link rel="stylesheet" href="_static/default.css" type="text/css" />
|
|
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
|
"""
|
|
|
|
after = """
|
|
<title>Breathe's documentation — BreatheExample v0.0.1 documentation</title>
|
|
<link rel="stylesheet" href="static/default.css" type="text/css" />
|
|
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
|
"""
|
|
|
|
def testReplace(self):
|
|
|
|
replacer = sphinxtogithub.Replacer("_static/default.css", "static/default.css")
|
|
self.assertEqual(replacer.process(self.before), self.after)
|
|
|
|
|
|
def testSuite():
|
|
|
|
suite = unittest.TestSuite()
|
|
|
|
suite.addTest(TestReplacer("testReplace"))
|
|
|
|
return suite
|
|
|
|
|