question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bug: sqlite url replace does not work

See original GitHub issue

Testcase:

def test_replace_database_url_components_sqlite():
    u = DatabaseURL("sqlite:///mydatabase.db")

    assert u.database == "mydatabase.db"
    new = u.replace(database="test_" + u.database)
    assert new.database == "test_mydatabase.db"
    assert str(new) == "sqlite:///test_mydatabase.db"

Pytest traceback:

E       AssertionError: assert 'sqlite:/test_mydatabase.db' == 'sqlite:///test_mydatabase.db'
E         - sqlite:/test_mydatabase.db
E         + sqlite:///test_mydatabase.db
E         ?        ++

If I find a solution I’ll make a PR. But so far I couldn’t make it work

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
tomchristiecommented, Feb 18, 2019

Right - pushed as 0.1.5

0reactions
tomchristiecommented, Feb 18, 2019

Thanks for raising this! 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

objective c - REPLACE INTO sqlite doesn't replace
got a weird problem. I have a sqlite table in my objective-c app: NSString *sql = @"CREATE TABLE IF NOT EXISTS user_results (id...
Read more >
Clarify usage of datasource url when using SQLite - `file:` is ...
Problem This appeared after I noticed that the engines error for an invalid SQLite url value says `"The URL for datasource db must...
Read more >
SQLite Release 3.8.5 On 2014-06-04
Fix a problem in CSV import in the command-line shell where if the leftmost field of the first row in the CSV file...
Read more >
Prisma Client API (Reference)
The Prisma Client API reference documentation is based on the following schema: ... issuing query and database responding - not only time taken...
Read more >
Resolving Failed to Configure a DataSource Error
Since the issue occurs due to the missing database connection, we can solve the problem simply by providing the data source properties. First, ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found