summaryrefslogtreecommitdiff
path: root/src/engine/SCons/Scanner/LaTeXTests.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine/SCons/Scanner/LaTeXTests.py')
-rw-r--r--src/engine/SCons/Scanner/LaTeXTests.py23
1 files changed, 7 insertions, 16 deletions
diff --git a/src/engine/SCons/Scanner/LaTeXTests.py b/src/engine/SCons/Scanner/LaTeXTests.py
index 93729d4..4f8ec16 100644
--- a/src/engine/SCons/Scanner/LaTeXTests.py
+++ b/src/engine/SCons/Scanner/LaTeXTests.py
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2001 - 2017 The SCons Foundation
+# Copyright (c) 2001 - 2019 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -21,7 +21,7 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Scanner/LaTeXTests.py rel_3.0.0:4395:8972f6a2f699 2017/09/18 12:59:24 bdbaddog"
+__revision__ = "src/engine/SCons/Scanner/LaTeXTests.py 103260fce95bf5db1c35fb2371983087d85dd611 2019-07-13 18:25:30 bdbaddog"
import SCons.compat
@@ -31,14 +31,13 @@ import sys
import unittest
import TestCmd
-import TestUnit
import SCons.Node.FS
import SCons.Scanner.LaTeX
test = TestCmd.TestCmd(workdir = '')
-test.write('test1.latex',"""
+test.write('test1.latex',r"""
\include{inc1}
\input{inc2}
include{incNO}
@@ -52,12 +51,12 @@ xyzzy \include{inc6}
\subinputfrom{subdir}{inc3e}
""")
-test.write('test2.latex',"""
+test.write('test2.latex',r"""
\include{inc1}
\include{inc3}
""")
-test.write('test3.latex',"""
+test.write('test3.latex',r"""
\includegraphics{inc4.eps}
\includegraphics[width=60mm]{inc5.xyz}
""")
@@ -123,7 +122,7 @@ def deps_match(self, deps, headers):
global my_normpath
scanned = list(map(my_normpath, list(map(str, deps))))
expect = list(map(my_normpath, headers))
- self.failUnless(scanned == expect, "expect %s != scanned %s" % (expect, scanned))
+ self.assertTrue(scanned == expect, "expect %s != scanned %s" % (expect, scanned))
class LaTeXScannerTestCase1(unittest.TestCase):
@@ -156,16 +155,8 @@ class LaTeXScannerTestCase3(unittest.TestCase):
files = ['inc5.xyz', 'subdir/inc4.eps']
deps_match(self, deps, files)
-
-def suite():
- suite = unittest.TestSuite()
- suite.addTest(LaTeXScannerTestCase1())
- suite.addTest(LaTeXScannerTestCase2())
- suite.addTest(LaTeXScannerTestCase3())
- return suite
-
if __name__ == "__main__":
- TestUnit.run(suite())
+ unittest.main()
# Local Variables:
# tab-width:4