Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
oliver-sanders committed Jul 2, 2019
1 parent 28665a6 commit f798de9
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 12 deletions.
7 changes: 3 additions & 4 deletions .codacy.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# exclude un-modified external software from Codacy analysis
exclude_paths:
- lib/html/static/css/bootstrap-*
- lib/html/static/js/bootstrap.min.js
- lib/html/static/css/jquery.dataTables*
- lib/html/static/js/jquery.dataTables*
- lib/html/static/css/bootstrap*
- lib/html/static/js/bootstrap*
- lib/html/static/css/jquery*
- lib/html/static/js/livestamp.min.js
- lib/html/static/js/moment.min.js
- lib/python/isodatetime/
Expand Down
6 changes: 6 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
doc/*
lib/html/static/js/bootstrap*
lib/html/static/js/dataTables.bootstrap*
lib/html/static/js/jquery*
lib/html/static/js/livestamp.min.js
lib/html/static/js/moment.min.js
4 changes: 1 addition & 3 deletions lib/html/static/js/rosie-disco.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ Rosie.query = function() {
q_open_groups -= group1.length
}
q += "q=" + filter_list.join("+");
var suffix = row.attr("id").substr(1);
});
if ($("#query-all").attr("checked")) {
q += "&all_revs=1"
Expand Down Expand Up @@ -100,7 +99,6 @@ Rosie.query_remove = function() {
Rosie.query_reset();
};
Rosie.query_groups_toggle = function (event_obj) {
var tbody = $("#query-table tbody");
var control = $("#show-groups");
var show_groups = null;
if (event_obj == null) {
Expand All @@ -116,7 +114,7 @@ Rosie.query_groups_toggle = function (event_obj) {
else {
show_groups = !control.hasClass("active");
}
$("#query-table > tbody > tr").each(function(i) {
$("#query-table > tbody > tr").each(function() {
var row = $(this);
var group0 = $(".q_group0", row);
var group1 = $(".q_group1", row);
Expand Down
3 changes: 1 addition & 2 deletions lib/python/rose/metadata_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
import sys
import tempfile

import pygraphviz # Graphviz and pygraphviz need to be installed.

from functools import cmp_to_key

import rose.config
Expand Down Expand Up @@ -88,6 +86,7 @@ def get_node_state_attrs(config, section, option=None, allowed_sections=None):
def get_graph(config, meta_config, name, allowed_sections=None,
allowed_properties=None, err_reporter=None):
"""Return a Graphviz graph object constructed from metadata properties."""
import pygraphviz # Graphviz and pygraphviz need to be installed.
if allowed_sections is None:
allowed_sections = []
if allowed_properties is None:
Expand Down
3 changes: 1 addition & 2 deletions lib/python/rosie/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
import textwrap
import time

import pygraphviz

import rose.metadata_graph
import rose.opt_parse
import rose.reporter
Expand Down Expand Up @@ -172,6 +170,7 @@ def add_node(graph, node, node_label_properties, **kwargs):

def make_graph(suite_data, filter_id, properties, prefix, max_distance=None):
"""Construct the pygraphviz graph."""
import pygraphviz
graph = pygraphviz.AGraph(directed=True)
graph.graph_attr["rankdir"] = "LR"
if filter_id:
Expand Down
2 changes: 1 addition & 1 deletion t/rosie-disco/00-basic.t
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ URL_FOO_Q="${URL_FOO}query?"
#-------------------------------------------------------------------------------
# Test for correct status and headers in root index pages.

# Note: 'curl -I' always procudes 'text/html' content type for Tornado apps,
# Note: 'curl -I' always produces 'text/html' content type for Tornado apps,
# so to request just the JSON data, need to use 'curl -i', see e.g.
# https://groups.google.com/forum/#!topic/python-tornado/bolRj0wSfos.

Expand Down
3 changes: 3 additions & 0 deletions t/rosie-graph/00-basic.t
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
if ! python3 -c 'import tornado, sqlalchemy' 2>/dev/null; then
skip_all '"tornado" or "sqlalchemy" not installed'
fi
if ! python3 -c 'import pygraphviz' 2>/dev/null; then
skip_all '"pygraphviz" not installed'
fi
tests 33
#-------------------------------------------------------------------------------
# Setup Rose site/user configuration for the tests.
Expand Down

0 comments on commit f798de9

Please sign in to comment.