Skip to content

Commit

Permalink
fix: update examples and tests to work with latest (dev) version of p…
Browse files Browse the repository at this point in the history
…2s-core
  • Loading branch information
robinvandernoord committed Nov 15, 2023
1 parent b3351a2 commit 2d0a5db
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions examples/examples.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/bash

# no 'empty' table should show up for both of these examples, and their dialect should be mysql.
cat settings_in_code.py | pydal2sql
cat settings_via_cli.py | pydal2sql mysql --tables person
cat settings_in_code.py | pydal2sql create
cat settings_via_cli.py | pydal2sql create mysql --tables person

# this file contains unknown variables, so only works with --magic:
pydal2sql magic.py --magic
pydal2sql create magic.py --magic
4 changes: 2 additions & 2 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def test_with_import():
assert result.exit_code == 0

assert 'success' in result.stderr
assert "CREATE TABLE something" in result.stdout
assert "CREATE TABLE something" in result.stdout or 'CREATE TABLE "something"' in result.stdout


def test_with_function():
Expand All @@ -129,4 +129,4 @@ def test_with_function():
assert result.exit_code == 0

assert 'success' in result.stderr
assert "CREATE TABLE empty" in result.stdout
assert "CREATE TABLE empty" in result.stdout or 'CREATE TABLE "empty"' in result.stdout

0 comments on commit 2d0a5db

Please sign in to comment.