Skip to content

Commit

Permalink
Added commentary to URN testing (#87)
Browse files Browse the repository at this point in the history
* Added commentary to URN testing

* Added langauge and URN for commentary type

Added tests for these as well

* Changed version number

Also added changes to CHANGES.txt
  • Loading branch information
sonofmun committed May 4, 2017
1 parent 3537e83 commit 52426e5
Show file tree
Hide file tree
Showing 6 changed files with 6,386 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.0.1 - 2017-05-04

Added the new "commentary" type to the tests for language and URNs

## 1.0.0 - 2017-04-21

- Moved to MyCapytain 2.0.0b20
Expand Down
6 changes: 5 additions & 1 deletion HookTest/capitains_units/cts.py
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,10 @@ def has_urn(self):
"//tei:body/tei:div[@type='translation' and starts-with(@n, 'urn:cts:')]",
namespaces=TESTUnit.NS
)
urns += self.xml.xpath(
"//tei:body/tei:div[@type='commentary' and starts-with(@n, 'urn:cts:')]",
namespaces=TESTUnit.NS
)
status = len(urns) > 0
if status:
logs = urns[0].get("n")
Expand Down Expand Up @@ -585,7 +589,7 @@ def language(self):
"""
if self.scheme == "epidoc":
try:
self.lang = self.xml.xpath('/tei:TEI/tei:text/tei:body/tei:div[@type="edition" or @type="translation"]',
self.lang = self.xml.xpath('/tei:TEI/tei:text/tei:body/tei:div[@type="edition" or @type="translation" or @type="commentary"]',
namespaces=TESTUnit.NS)[0].get('{http://www.w3.org/XML/1998/namespace}lang')
except:
self.lang = ''
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

setup(
name='HookTest',
version="1.0.0",
version="1.0.1",
description='Hook Test Script for GitHub/CapiTainS repositories',
long_description=long_description,
url='http://github.com/Capitains/HookTest',
Expand Down
Loading

0 comments on commit 52426e5

Please sign in to comment.