summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorJames Godfrey-Kittle <jamesgk@google.com>2015-09-29 17:33:54 -0700
committerJames Godfrey-Kittle <jamesgk@google.com>2015-09-29 17:33:54 -0700
commitbdf6327ad72f162ca16a16c446d2093ffb75f143 (patch)
treeb2e86b7c4eaddcd2a4c94c387ce8481a5f429cd7 /scripts
parent74bdf5953a7c20cdca0442e1b70a2d3b24072d01 (diff)
Move all name tests to common_tests
Diffstat (limited to 'scripts')
-rw-r--r--scripts/common_tests.py18
-rwxr-xr-xscripts/run_web_tests.py18
2 files changed, 18 insertions, 18 deletions
diff --git a/scripts/common_tests.py b/scripts/common_tests.py
index 952e794..f30afa0 100644
--- a/scripts/common_tests.py
+++ b/scripts/common_tests.py
@@ -238,6 +238,24 @@ class TestNames(FontTest):
self.assertIn(17, records)
self.assertEqual(records[17], self.build_style(weight, slope))
+ def test_unique_identifier_and_full_name(self):
+ """Tests the unique identifier and full name."""
+ for font_file, records in zip(self.font_files, self.names):
+ family, weight, slope = self.parse_filename(font_file)
+ style = self.build_style(weight, slope)
+ expected_name = family + ' ' + style
+ self.assertEqual(records[3], expected_name)
+ self.assertEqual(records[4], expected_name)
+ self.assertFalse(records.has_key(18))
+
+ def test_postscript_name(self):
+ """Tests the postscript name."""
+ for font_file, records in zip(self.font_files, self.names):
+ family, weight, slope = self.parse_filename(font_file)
+ style = self.build_style(weight, slope)
+ expected_name = (family + '-' + style).replace(' ', '')
+ self.assertEqual(records[6], expected_name)
+
def test_postscript_name_for_spaces(self):
"""Tests that there are no spaces in PostScript names."""
for records in self.names:
diff --git a/scripts/run_web_tests.py b/scripts/run_web_tests.py
index 7687989..8ec42be 100755
--- a/scripts/run_web_tests.py
+++ b/scripts/run_web_tests.py
@@ -43,24 +43,6 @@ class TestNames(common_tests.TestNames):
family_name = 'Roboto'
mark_heavier_as_bold = True
- def test_unique_identifier_and_full_name(self):
- """Tests the unique identifier and full name."""
- for font_file, records in zip(self.font_files, self.names):
- family, weight, slope = self.parse_filename(font_file)
- style = self.build_style(weight, slope)
- expected_name = family + ' ' + style
- self.assertEqual(records[3], expected_name)
- self.assertEqual(records[4], expected_name)
- self.assertFalse(records.has_key(18))
-
- def test_postscript_name(self):
- """Tests the postscript name."""
- for font_file, records in zip(self.font_files, self.names):
- family, weight, slope = self.parse_filename(font_file)
- style = self.build_style(weight, slope)
- expected_name = (family + '-' + style).replace(' ', '')
- self.assertEqual(records[6], expected_name)
-
class TestDigitWidths(common_tests.TestDigitWidths):
loaded_fonts = FONTS