| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
…t. I'm not sure where a lot of the zip stuff should go.
| # TODO: Move the XML into external files and load them when needed | ||
|
|
||
| TABLEAU_93_WORKBOOK = '''<?xml version='1.0' encoding='utf-8' ?><workbook source-build='9.3.1 (9300.16.0510.0100)' source-platform='mac' version='9.3' xmlns:user='http://www.tableausoftware.com/xml/user'><datasources><datasource caption='xy (TestV1)' inline='true' name='sqlserver.17u3bqc16tjtxn14e2hxh19tyvpo' version='9.3'><connection authentication='sspi' class='sqlserver' dbname='TestV1' odbc-native-protocol='yes' one-time-sql='' server='mssql2012.test.tsi.lan' username=''></connection></datasource></datasources></workbook>''' # noqa | ||
| TABLEAU_93_TWB = 'test/assets/TABLEAU_93_TWB.twb' |
There was a problem hiding this comment.
You should use this pattern when accessing files in test cases, so it's always based on a specific path:
os.path.join(
os.path.dirname(__file__),
'test', 'asserts', filename
))
Sorry, something went wrong.
There was a problem hiding this comment.
Yeah, that's less fragile.
It looks like it would be:
os.path.join( os.path.dirname(__file__), 'asserts', filename) )
No 'tests' directory, since bvt.py is already located in test.
Since os.path.dirname(__file__) is duplicated, how about:
`TEST_DIR = os.path.dirname(file)
TABLEAU_93_TWB = os.path.join(TEST_DIR, 'assets', 'TABLEAU_93_TWB.twb`
... etc
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
-- Yay no more embedded xml!
Tests pass on OS X py27 and py35
Replaces #13