GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Basic TWBX Support by t8y8 · Pull Request #43 · tableau/document-api-python

Conversation

@t8y8

@t8y8 t8y8 commented Jun 29, 2016

Copy link
Copy Markdown
Contributor
  • Support for read/write of connections in TWBX files
  • New TWBX tests
  • Moved test assets into a new folder and read from the gold copies for tests.
    -- Yay no more embedded xml!

Tests pass on OS X py27 and py35

Replaces #13

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
t8y8 added 5 commits May 24, 2016 22:12
@t8y8
Here's an intermediate stab at twbx support. Does not include TDSX ye…
6663c87
…t. I'm not sure where a lot of the zip stuff should go.
@t8y8
Resolve merge conflicts
cbb596b
@t8y8
Merge branch 'zip-support' into development
76344b4
@t8y8
Update the tests to use external files
c70cb5f
@t8y8
Fix case sensitivity
955e418
graysonarts
graysonarts reviewed Jun 29, 2016
View reviewed changes
Comment thread test/bvt.py Outdated
# 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'

@graysonarts graysonarts Jun 29, 2016 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@t8y8 t8y8 Jun 29, 2016

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Uh oh!

There was an error while loading. Please reload this page.

graysonarts reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@graysonarts graysonarts mentioned this pull request Jun 29, 2016
Initial stab at TWBX support #13
Closed
@t8y8
Use more flexible paths for test assets
92668e0
@graysonarts
graysonarts merged commit 23e897a into tableau:development Jun 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@t8y8 @graysonarts
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.