Пример #1
0
 def test_differs_from_a_project_with_another_invocation(self):
     self.assertNotEqual(
         FlapTestCase(
             "foo",
             a_project().with_main_file("blabla").build(),
             a_project().with_merged_file("something different").build(),
             Invocation("foo.tex"),
             False,
             [Fragment("test.tex", 1, 1, r"\input{foo}")]),
         self.test_case)
Пример #2
0
    def test_parsing_a_test_case_with_invocation(self):
        yaml_file = self._create_file(YamlTest.that_includes_invocation("Test 1"))
        test_case = self._read_test_case_from(yaml_file)

        expected = FlapTestCase(
                        "Test 1",
                        a_project().with_main_file("blabla").build(),
                        a_project().with_merged_file("blabla").build(),
                        Invocation(tex_file="foo.tex"),
                        skipped=False)

        self.assertEqual(expected, test_case)
Пример #3
0
 def _extract_invocation_from(self, project):
     if self.INVOCATION_KEY in project:
         invocation = project[self.INVOCATION_KEY]
         if self.TEX_FILE_KEY in invocation:
             return Invocation(invocation[self.TEX_FILE_KEY])
     return Invocation()
Пример #4
0
 def test_differs_from_a_different_invocation(self):
     self.assertNotEqual(Invocation("bar.tex"), self._invocation)
Пример #5
0
 def test_equals_similar_invocation(self):
     self.assertEqual(Invocation(self._tex_file), self._invocation)
Пример #6
0
 def test_default_tex_file(self):
     invocation = Invocation()
     self.assertEqual(Invocation.DEFAULT_TEX_FILE, invocation.tex_file)
Пример #7
0
 def setUp(self):
     self._tex_file = "foo.tex"
     self._invocation = Invocation(self._tex_file)