kopia lustrzana https://github.com/micropython/micropython-lib
xmltok: test_xmltok: Find data file relative to module dir.
Allows to run via test aggregators.pull/121/merge
rodzic
ba14d0ab70
commit
b2dd97cd6c
|
@ -15,7 +15,11 @@ expected = [
|
||||||
('END_TAG', ('s', 'Envelope')),
|
('END_TAG', ('s', 'Envelope')),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
dir = "."
|
||||||
|
if "/" in __file__:
|
||||||
|
dir = __file__.rsplit("/", 1)[0]
|
||||||
|
|
||||||
ex = iter(expected)
|
ex = iter(expected)
|
||||||
for i in xmltok.tokenize(open("test.xml")):
|
for i in xmltok.tokenize(open(dir + "/test.xml")):
|
||||||
#print(i)
|
#print(i)
|
||||||
assert i == next(ex)
|
assert i == next(ex)
|
||||||
|
|
Ładowanie…
Reference in New Issue