Revision: 729b9846bd1a
Author:   Janne Härkönen <[email protected]>
Date:     Mon Nov 28 00:55:32 2011
Log:      test_xmlsource: ignore .pyc file when reading
http://code.google.com/p/robotframework/source/detail?r=729b9846bd1a

Modified:
 /utest/utils/test_xmlsource.py

=======================================
--- /utest/utils/test_xmlsource.py      Sun Nov 27 23:53:58 2011
+++ /utest/utils/test_xmlsource.py      Mon Nov 28 00:55:32 2011
@@ -1,3 +1,4 @@
+import os
 import unittest

 from robot.utils.asserts import assert_equals, assert_raises, assert_true
@@ -21,11 +22,12 @@
         self._verify_string_representation(source, '<in-memory file>')

     def test_opened_file_object_can_be_used(self):
-        source = XmlSource(open(__file__))
+        fname = os.path.splitext(__file__)[0] + '.py'
+        source = XmlSource(open(fname))
         with source as src:
             assert_true(src.read().startswith('import'))
         assert_true(src.closed is False)
-        self._verify_string_representation(source, __file__)
+        self._verify_string_representation(source, fname)

     def test_filename_is_validated(self):
         def use(src):

Reply via email to