Ejemplo n.º 1
0
 def test_existing_file(self):
     path = os.path.join(self.tmpdir, "keywords.py")
     touch(path)
     kwfile = KeywordFile(path)
     assert kwfile.filename == "keywords.py"
     assert kwfile.path == path
     assert kwfile.keywords == {}
Ejemplo n.º 2
0
 def test_add_keyword(self):
     kwfile = KeywordFile("test.TestLibrary")
     kwfile.add_keywords("the documentation...", ("Detail", "Contact"))
     assert len(kwfile.keywords) == 1
     assert kwfile.keywords[("Detail", "Contact")] == "the documentation..."
Ejemplo n.º 3
0
 def test_file_as_module(self):
     kwfile = KeywordFile("cumulusci.robotframework.Salesforce")
     assert kwfile.filename == "Salesforce"
     assert kwfile.path == "cumulusci.robotframework.Salesforce"
     assert kwfile.keywords == {}