scripts/webopen.py is not tested #1149

Closed
opened 2010-08-02 19:07:04 +00:00 by davidsarah · 4 comments
davidsarah commented 2010-08-02 19:07:04 +00:00
Owner

(http://tahoe-lafs.org/codecoverage/tahoe-lafs/zomp/htmlcov-allmydata-tahoe-1.7.1-r4630/src_allmydata_scripts_tahoe_webopen.html)

We shouldn't try to actually open a webbrowser when running the test suite, but we could mock webbrowser.open and check that it is called with the right URL.

(http://tahoe-lafs.org/codecoverage/tahoe-lafs/zomp/htmlcov-allmydata-tahoe-1.7.1-r4630/src_allmydata_scripts_tahoe_webopen.html) We shouldn't try to actually open a webbrowser when running the test suite, but we could mock `webbrowser.open` and check that it is called with the right URL.
tahoe-lafs added the
code-frontend-cli
major
defect
1.7.1
labels 2010-08-02 19:07:04 +00:00
tahoe-lafs added this to the soon milestone 2010-08-02 19:07:04 +00:00
davidsarah commented 2011-07-24 22:15:34 +00:00
Author
Owner

Attachment test-for-webopen.darcs.patch (18275 bytes) added

Add test for webopen. fixes #1149

**Attachment** test-for-webopen.darcs.patch (18275 bytes) added Add test for webopen. fixes #1149
tahoe-lafs modified the milestone from soon to 1.9.0 2011-07-24 22:16:08 +00:00
nejucomo self-assigned this 2011-08-01 02:52:14 +00:00

I read over the patch and understand the implementation.

After applying the patch I can successfully run:

$ python ./setup.py test --suite allmydata.test.test_cli.Webopen

-after many messages about dependency management, the actual tests succeed and look like this:

allmydata.test.test_cli
  Webopen
    test_webopen ...                                                       [OK]
    test_webopen_with_nonexistent_alias ...                                [OK]

-------------------------------------------------------------------------------
Ran 2 tests in 0.664s

PASSED (successes=2)

I therefore consider this patch good to merge because it only adds a unittest, which successfully passes, and which does not launch my webbrowser.

I read over the patch and understand the implementation. After applying the patch I can successfully run: ``` $ python ./setup.py test --suite allmydata.test.test_cli.Webopen ``` -after many messages about dependency management, the actual tests succeed and look like this: ``` allmydata.test.test_cli Webopen test_webopen ... [OK] test_webopen_with_nonexistent_alias ... [OK] ------------------------------------------------------------------------------- Ran 2 tests in 0.664s PASSED (successes=2) ``` I therefore consider this patch good to merge because it only adds a unittest, which successfully passes, and which does not launch my webbrowser.
david-sarah@jacaranda.org commented 2011-08-11 00:17:46 +00:00
Author
Owner

In changeset:6c2670641e26e8ca:

Add test for webopen. fixes #1149
In changeset:6c2670641e26e8ca: ``` Add test for webopen. fixes #1149 ```
tahoe-lafs added the
fixed
label 2011-08-11 00:17:46 +00:00
david-sarah@jacaranda.org closed this issue 2011-08-11 00:17:46 +00:00
david-sarah@jacaranda.org commented 2011-08-11 02:42:08 +00:00
Author
Owner

In [5174/ticket393-MDMF-2]:

Add test for webopen. fixes #1149
In [5174/ticket393-MDMF-2]: ``` Add test for webopen. fixes #1149 ```
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Reference: tahoe-lafs/trac-2024-07-25#1149
No description provided.