Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use lowercase true|false in GEXF writer #914

Merged
merged 2 commits into from Aug 13, 2013
Merged

Conversation

hagberg
Copy link
Member

@hagberg hagberg commented Jul 24, 2013

Fixes #912

@ghost ghost assigned hagberg Jul 24, 2013
@coveralls
Copy link

Coverage Status

Coverage decreased (-0%) when pulling 1270e10 on hagberg:gexf-bool into 7d9682a on networkx:master.

nx.write_gexf(G,fh)
fh.seek(0)
H=nx.read_gexf(fh,node_type=int)
assert_true(H.node[1]['testattr'], True)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be only one argument to assert_true()...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK I updated it.

On Wed, Jul 24, 2013 at 6:08 PM, Dan Schult notifications@github.comwrote:

In networkx/readwrite/tests/test_gexf.py:

@@ -303,4 +303,11 @@ def test_write_with_node_attributes(self):
obtained = '\n'.join(nx.generate_gexf(G))
assert_equal( expected, obtained )

  • def test_bool(self):
  •    G=nx.Graph()
    
  •    G.add_node(1, testattr=True)
    
  •    fh = io.BytesIO()
    
  •    nx.write_gexf(G,fh)
    
  •    fh.seek(0)
    
  •    H=nx.read_gexf(fh,node_type=int)
    
  •    assert_true(H.node[1]['testattr'], True)
    

Should be only one argument to assert_true()...


Reply to this email directly or view it on GitHubhttps://github.com//pull/914/files#r5388054
.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0%) when pulling ef75abd on hagberg:gexf-bool into 7d9682a on networkx:master.

hagberg added a commit that referenced this pull request Aug 13, 2013
Use lowercase true|false in GEXF writer
@hagberg hagberg merged commit d365063 into networkx:master Aug 13, 2013
@hagberg hagberg deleted the gexf-bool branch December 22, 2013 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

[NX1.7] Crash with read_gexf(g) if there are boolean attributes
3 participants