예제 #1
0
파일: test_yaml.py 프로젝트: fchauvel/flap
 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
파일: test_yaml.py 프로젝트: alcrene/flap
    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
파일: yaml.py 프로젝트: fchauvel/flap
 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)