diff --git a/README.rst b/README.rst index 6b1a0de..662d145 100644 --- a/README.rst +++ b/README.rst @@ -2,6 +2,9 @@ pyjavaprops ------------- +.. image:: https://travis-ci.org/luiscberrocal/pyjavaprops.svg?branch=master + :target: https://travis-ci.org/luiscberrocal/pyjavaprops + Library to read Java style properties files. I don't particularly like properties files but working with them in Java is very easy. I recently had to support reading properties files using Python. diff --git a/setup.py b/setup.py index 6a3d274..f58105b 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ with open("README.rst") as src: readme = src.read() -version = '0.1.3' +version = '0.1.4' setup( name='pyjavaprops', diff --git a/tests/test_javaproperties.py b/tests/test_javaproperties.py index ec3ac66..d6897a3 100644 --- a/tests/test_javaproperties.py +++ b/tests/test_javaproperties.py @@ -24,11 +24,19 @@ def test_variable(self): def test_variable_dollar(self): self.assertEqual('Value01/path/to/myapp', self.java_properties['Key24']) + def test_key_with_spaces_eq(self): + #Key17\ With\ Spaces=Value17 + self.assertEqual('Value17', self.java_properties['Key17 With Spaces']) + + def test_key_with_spaces(self): + #Key16\ With\ Spaces:Value16 + self.assertEqual('Value16', self.java_properties['Key16 With Spaces']) + def test_load(self): filename = os.path.join(TEST_DATA_FOLDER, 'simple.properties') simple_java_properties = JavaProperties() simple_java_properties.load(open(filename)) - print(simple_java_properties) + self.assertEqual('1.5, 1.6.1, 1.7, 1.8,', simple_java_properties['supported.java.versions']) if __name__ == '__main__':