dbt-labs / dbt-adapter-tests

a pytest plugin for dbt adapter test suites
19 stars 11 forks source link

0.5.1 -- Unknown error: assert True == False #20

Closed dataders closed 2 years ago

dataders commented 3 years ago

@kwigley I'm getting an inscrutable error when I use pytest-dbt-adapter==0.5.1 that doesn't happen when I revert to 0.4.0. Below is the error message and here's the full stacktrace.

p.s. there's no 0.5.1 release here on GitHub? how is it different from 0.5.0?

=========================================================================================================== FAILURES ============================================================================================================
____________________________________________________________________________________________________ usecase: test_dbt_empty ____________________________________________________________________________________________________
Unknown error: assert True == False
 +  where False = <function exists at 0x7fd62d1f4670>('/var/folders/51/973_ltb91wvbv855tnvdb66r0000gq/T/tmpxq9l13ce/project/target/run_results.json')
 +    where <function exists at 0x7fd62d1f4670> = <module 'posixpath' from '/Users/anders.swanson/opt/anaconda3/envs/dbtdev/lib/python3.9/posixpath.py'>.exists
 +      where <module 'posixpath' from '/Users/anders.swanson/opt/anaconda3/envs/dbtdev/lib/python3.9/posixpath.py'> = os.path in test index 1 (item_type=run_results)

p.p.s why does dbt --version not output dbt-synapse when it's installed in development mode (pip install -e .) but does show up when installed via PyPI?

(dbtdev) anders.swanson@AMAC02FG0TMMD6R dbt-synapse % dbt --version        
installed version: 0.19.1
   latest version: 0.19.1

Up to date!

Plugins:
  - sqlserver: 0.19.1
(dbtdev) anders.swanson@AMAC02FG0TMMD6R dbt-synapse %pip list | grep "dbt"
dbt-core                 0.19.1
dbt-sqlserver            0.19.1
dbt-synapse              0.19.1              /Users/anders.swanson/repos/dbt-synapse
pytest-dbt-adapter       0.5.1
jtcohen6 commented 3 years ago

I believe https://github.com/fishtown-analytics/dbt-adapter-tests/commit/2ffb4505ba998eef160c52b86db8c005efb757f1, included in 0.5.0, accounts for a change included in dbt v0.20.0: https://github.com/fishtown-analytics/dbt/issues/3313. So pytest-dbt-adapter>0.5 should only be used with dbt-core>0.20.

@kwigley Would it make sense to establish that mapping, say by requiring a minimum dbt-core version here? https://github.com/fishtown-analytics/dbt-adapter-tests/blob/54faac79c882a4e5688b89466c51f766a3074450/setup.py#L27

p.s. there's no 0.5.1 release here on GitHub? how is it different from 0.5.0?

We should add a release here, too :) The big difference (https://github.com/fishtown-analytics/dbt-adapter-tests/commit/33872d1cc0f936677dae091c3e0b49771c280514) was adding another module with some art from core integration tests, so that we could write more effective integration tests for dbt-spark. It's still not in primetime shape, though, and finicky to use, so we haven't committed to it long term.

p.p.s why does dbt --version not output dbt-synapse when it's installed in development mode (pip install -e .) but does show up when installed via PyPI?

This is something I've experienced and wondered myself. +1 to the mystery.