1.1 --- a/tests/test_calendar_stream.py Mon Apr 02 22:17:43 2012 +0200
1.2 +++ b/tests/test_calendar_stream.py Thu Apr 25 19:20:10 2013 +0200
1.3 @@ -6,9 +6,16 @@
1.4 """
1.5
1.6 import codecs, vCalendar, os
1.7 +import sys
1.8
1.9 this_dir = os.path.split(__file__)[0]
1.10 -f = codecs.open(os.path.join(this_dir, "test.ics"), encoding="utf-8")
1.11 +
1.12 +if len(sys.argv) > 1:
1.13 + filename = sys.argv[1]
1.14 +else:
1.15 + filename = os.path.join(this_dir, "test.ics")
1.16 +
1.17 +f = codecs.open(filename, encoding="utf-8")
1.18 out = codecs.open("tmp.ics", "w", encoding="utf-8")
1.19 try:
1.20 doc = vCalendar.iterparse(f)
1.21 @@ -22,7 +29,7 @@
1.22
1.23 print "--------"
1.24
1.25 -f = codecs.open(os.path.join(this_dir, "test.ics"), encoding="utf-8")
1.26 +f = codecs.open(filename, encoding="utf-8")
1.27 f2 = codecs.open("tmp.ics", encoding="utf-8")
1.28 try:
1.29 doc = vCalendar.iterparse(f)